Scripts to help setting up gamepads on Linux
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Feb 6, 2015 Update Dec 7, 2017 Added script for generating xboxdrv mappings. Apr 6, 2015


Scripts to help setting up gamepads on Linux:

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


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


    $ gamepad-util/
    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