Scripts to help setting up gamepads on Linux https://aweirdimagination.net/tag/joystick/
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Daniel Perelman e155a6cfcc Merge remote-tracking branch 'origin/master' 2 years ago
button_maps Add notes on which button is which on various controller setups. 5 years ago
LICENSE Initial commit 9 years ago
README.md Update README.md 6 years ago
create_xboxdrv_evdev_map.py Merge remote-tracking branch 'origin/master' 2 years ago
gcn Include script generated using create_xboxdrv_evdev_map.py for GameCube controller connected via wii-u-gc-adapter. 5 years ago
identify_evdev.py Merge remote-tracking branch 'origin/master' 2 years ago

README.md

gamepad-util

Scripts to help setting up gamepads on Linux:

  • identify_evdev.py (blog post: Identifying joystick devices): blocks until any /dev/input/event* device has any input and prints that device's path.

    Example:

    $ gamepad-util/identify_evdev.py
    /dev/input/event22
    
  • create_xboxdrv_evdev_map.py (blog post: Emulating Xbox controllers on Linux): interactive script to help generate arguments to xboxdrv for remapping buttons/axes as desired.

    Example:

    $ gamepad-util/create_xboxdrv_evdev_map.py
    Press any button on only the joystick you are setting up.
    Selected event device: /dev/input/event22
    Stop pressing any buttons.
    Press the corresponding button on your controller. If the button doesn't exist, press the start button again to ignore it.
    Press start: BTN_START
    Press back (or select): BTN_SELECT
    Press guide (large center button): (none)
    # ...
    Press trigger lt (left analog trigger (L or L2 button)) all the way: ABS_Z
    Press trigger rt (right analog trigger (R or R2 button)) all the way: ABS_RZ
    xboxdrv --evdev "/dev/input/event22" --evdev-keymap "BTN_A=a,BTN_B=b,BTN_TL=lb,BTN_THUMBR=tr,BTN_SELECT=back,BTN_START=start,BTN_THUMBL=tl,BTN_TR=rb,BTN_WEST=y,BTN_NORTH=x" --evdev-absmap "ABS_RZ=rt,ABS_RY=y2,ABS_RX=x2,ABS_Z=lt,ABS_Y=y1,ABS_X=x1" --axismap "-y2=y2,-y1=y1" --mimic-xpad --silent