Gamepad() on Ubuntu 18.04: mapping axis to button press

Hi,

I'd like to use a Logitech F310 gamepad as a response device in PTB.
Specifically, I want to use the D-Pad (the cross) not as an axis but like a button press. That is, the subject makes a decision UP vs DOWN and this should correspond to D-Pad-up and D-Pad-down, respectively.

I successfully installed the 'xserver-xorg-input-joystick' driver and adjusted the button mapping in '/etc/X11/xorg.conf.d/52-MyJoystick.conf'. The button mapping is working fine (as I tested with Gamepad() in PTB) and so I assume the driver is working fine, as well.
However, no matter what I enter for the axes mappings, Gamepad('GetNumAxes', id) always shows two axes and Gamepad('GetAxis', id, 1:n) always returns values changing continuously from -32768 to 32741 (axis 1) and -32768 to -9741 (axis 2).

I tried to map the axis to keypresses (like below). However, KbCheck(-1) wouldn't detect any keypresses.
Option    "MapAxis1"    "mode=relative    keylow=113    keyhigh=114"

Curiously, the Gamepad is added twice to the system. Once as 'Logitech Dual Action' and then as 'Logitech Dual Action (keys)' (see attached excerpt from /var/log/Xorg.0.log). The latter doesn't have any axes or buttons according to Gamepad().

What else can I try to get the D-Pad return button(-like) presses?

Best,
Wanja


MATLAB Version: 9.5.0.1049112 (R2018b) Update 3
PTB version: 3.0.15
OS: Xubuntu 18.04.1
In the meantime, I stumbled upon 'HebiJoystick', a free alternative to Simulink's 'vrjoystick'. This seems to work out of the box and provides input I can work with (degree for the d-pad):

Is there any reason not to use vrjoystick or HebiJoystick? My main concern would be jitter in the response times.