Talk:Game Controller Support in Linux
Contents
see also
See also: Steam for Linux
QinHeng Electronics Foot Pedal Configuration Alongside USB Game Controller.
When the foot pedal is connected, it causes trouble. QJoyPad shows a USB joystick with 75 buttons and analog axis. This for a single pedal foot switch. The QJoyPad interface is broken and extends beyond the boundaries of the screen. The spacing between buttons is wrong. None of the detected buttons respond to foot pedal press.
In the brand new default configuration the QinHeng Electronics Foot Pedal's internal chip also creates a false keyboard device that send only the letter 'b' to the computer via HID control.
Step #1 - program the damn foot pedal without Microsoft Windows to change the letter marcro from 'b' to whatever you desire.
Step #2 - disconnect the foot pedal, connect the usb game controller, and hide it from games using evdev API (such as Steam) so we can customize with QJoyPad. Also, the game controller must be js0 for QJoyPad to treat it correctly so it works with Steam or some other popular games. That is why we want the game controller connected first and assigned js0 in /dev/input
Step #3 - connect the foot pedal, and hide it from Joystick API so that QJoyPad won't detect it and cause QJoyPad to break.
Step #4 - Open QJoypad and verify control is from the game pad only, it does not see the foot pedal, and that game pad is using Joystick API only, not evdev API
Step #5 - launch Steam or independent game.
Using QJoyPad for testing
You can use the following parameter to make QJoyPad easier to close during testing...
qjoypad --notray
Utility to program Foot Pedal
Download the utility into a subdirectory of your home directory and compile
mkdir ~/footswitch-master cd footswitch-master git clone https://github.com/rgerganov/footswitch.git cd footswitch/ make sudo make install
Run the utility from the command line, it has to be sudo
First lets make sure we can read the current key macro from the footswitch chip
sudo footswitch -r
Now lets set the correct switch slot (because you may have a 1 pedal switch the utility will support up to a 3 pedal switch)
sudo footswitch -1
Now lets change the key macro to the letter 'w' which we need to walk forward in one of our games
sudo footswitch -k w
Thank you JeffG
- https://www.linuxmusicians.com/viewtopic.php?f=24&t=9880
- https://github.com/rgerganov/footswitch
- https://www.bountysource.com/teams/footswitch/issues
device permissions to make all well
Tip: run jstest-gtk while doing this to monitor success.
The game pad and food pedal are both disconnected
- First, plug in the game pad
ls -l /dev/input/by-id lrwxrwxrwx 1 root root 9 Feb 9 23:48 usb-0079_USB_Gamepad-event-joystick -> ../event9 lrwxrwxrwx 1 root root 6 Feb 9 23:48 usb-0079_USB_Gamepad-joystick -> ../js0
and
cd /dev/input sudo chmod 000 event9
- Now plug in the foot pedal
ls -l /dev/input/by-id lrwxrwxrwx 1 root root 10 Feb 9 23:51 usb-1a86_e026-event-mouse -> ../event15 lrwxrwxrwx 1 root root 6 Feb 9 23:51 usb-1a86_e026-mouse -> ../js1
and
cd /dev/input sudo chmod -r js1
within /dev/input now you have:
crw-rw---- 1 root input 13, 79 Feb 9 23:51 event15 c---------+ 1 root input 13, 73 Feb 9 23:48 event9 crw-rw-r--+ 1 root input 13, 0 Feb 9 23:48 js0 c-w--w---- 1 root input 13, 1 Feb 9 23:51 js1
Launch QJoyPad
Launch Game