A tool to map joystick events to the one of an Xbox 360 controller
pip install ubox360==0.3.0
gamecontroller
This program (part of the SDL project) generates a gamecontrollerdb.txt
file with the gamepad mappings.
ArchLinux users can install it from AUR. Other users need to build this controllermap.c file.
gamecontrollerdb.txt
fileRun this command and follow instructions:
controllermap 0 > gamecontrollerdb.txt
This saves mappings into the gamecontrollerdb.txt
file.
You can check your mappings with sdl2-jstest (also available on AUR) by running this command:
sdl2-jstest --gamecontroller 0
If playing an SDL game, just copy your gamecontrollerdb.txt
file to the root directory of your game.