Skip to content

Instantly share code, notes, and snippets.

@yowcow
Last active April 9, 2021 23:42
Show Gist options
  • Save yowcow/c33a00b7ff89e50f6b3a58f24f1072b5 to your computer and use it in GitHub Desktop.
Save yowcow/c33a00b7ff89e50f6b3a58f24f1072b5 to your computer and use it in GitHub Desktop.
X11 Kensington Slimblade Trackball button mapping
#!/bin/sh
#
# Reference: https://unix.stackexchange.com/questions/453069/configuring-kensington-slimblade-in-linux
#
# Kensington Slimblade Trackball Button IDs:
#
# .------+------.
# | 2 | 8 |
# | .--+--. |
# +---+ 4/5 +---+
# | '--+--' |
# | 1 | 3 |
# '------+------'
#
# X11 Button Mapping string:
#
# LeftClick MiddleClick RightClick ScrollUp ScrollDown ? ? Back ?
# Find the input device
xinput | grep "Kensington Slimblade Trackball"
# Remap buttons
xinput set-button-map "Kensington Slimblade Trackball" 1 8 3 4 5 9 9 2 9;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment