Talk:Game Controller Support in Linux

From Free Knowledge Base- The DUCK Project: information for everyone
Revision as of 23:38, 9 February 2020 by Admin (Talk | contribs)

Jump to: navigation, search

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