Talk:Game Controller Support in Linux

Return to "Game Controller Support in Linux" page.

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 Radoslav Gerganov

How to enter special keys like PAUSE

sudo footswitch -S '48'

This produces only a momentary press of the PAUSE key. Goal: make it stay pressed as long as the pedal is pressed.

Not useful for Push to Talk because unknown how to make it send a continued keypress as opposed to the momentary keypress it currently sends

Developer addresses issue: Any way of implementing 'onRelease'? #12 "Unfortunately the hardware doesn't support this (no such events are being sent). If someone comes up with some clever hacks how to emulate this, I'd be happy to accept it."

How to make the foot pedal do a momentary ENTER keypress

sudo footswitch -k enter

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

qjoypad joy2key rejoystick

https://askubuntu.com/questions/239176/alternative-to-qjoypad

AntiMicro

https://github.com/AntiMicro/antimicro

As of May 24, 2016, antimicro has moved from https://github.com/Ryochan7/antimicro to https://github.com/AntiMicro/antimicro. Additionally, project management has passed from Travis (Ryochan7) to the AntiMicro organization due to Travis having other interests and priorities.

https://github.com/AntiMicro/antimicro

How to install AntiMicro on 64 bit Ubuntu 18.10 Cosmic Cuttlefish, Ubuntu 18.04 Bionic Beaver, Linux Mint 19.x and Elementary OS 0.5 Juno:

$ sudo apt install gdebi
$ wget https://launchpad.net/~mdeguzis/+archive/ubuntu/libregeek/+files/antimicro_2.23~artful-1_amd64.deb
$ sudo gdebi antimicro*.deb
Last modified on 1 May 2020, at 14:44