Skip to content

Instantly share code, notes, and snippets.

@rbellamy
Last active March 25, 2020 16:16
Show Gist options
  • Save rbellamy/50a644adf58167f87652 to your computer and use it in GitHub Desktop.
Save rbellamy/50a644adf58167f87652 to your computer and use it in GitHub Desktop.
Kensington Expert Mouse Trackball - ButtonMapping
# Kensington Expert Mouse Trackball
# Run "xinput" to see the id and what it's called
#
#
# Run "xev|grep Button -A 3" to see the actual mappings
# Bottom Right - 1
# Bottom Left - 3
# Upper Left - 2
# Upper Right - 8
# xinput get-button-map "Kensington Kensington Expert Mouse"
# 3 2 1 4 5 6 7 8 9 10 11 12
#
# ... which when translated looks like this:
# original | right | left |
# ----------------|-------|-------|
# 3 left | 1| 3|
# 2 middle | 8| 8|
# 1 right | 3| 1|
# 4 wheel up | 4| 4|
# 5 wheel down | 5| 5|
# 6 wheel left | 6| 6|
# 7 wheel right| 7| 7|
# 8 thumb1 | 9| 9|
# 9 thumb2 | 2| 2|
# 10 extbt1 | 10| 10|
# 11 extbt2 | 11| 11|
# 12 extbt3 | 12| 12|
Section "InputClass"
Identifier "Kensington Expert Mouse - Left Hand button mapping"
MatchProduct "Kensington Kensington Expert Mouse"
MatchDevicePath "/dev/input/event*"
Option "ButtonMapping" "3 8 1 4 5 6 7 9 2 10 11 12"
EndSection
button press 2
button release 2
button press 8
button release 8
^C
zsh: interrupt xinput test 10
2015-04-15 21:29:36
root@eanna i ~ # xinput get-button-map 10
3 2 1 4 5 6 7 8 9 10 11 12
2015-04-15 21:29:55
root@eanna i ~ # xinput set-button-map 10 3 8 1 4 5 6 7 9 2 10 11 12
2015-04-15 21:30:06
root@eanna i ~ # xinput test 10
button press 8
button release 8
button press 9
button release 9
^C
zsh: interrupt xinput test 10
2015-04-15 21:30:14
root@eanna i ~ #
@csselo
Copy link

csselo commented Jan 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment