In an X configuration file mouse buttons can be mapped using a ButtonMapping option:
Section "InputClass"
# ...
Option "ButtonMapping" "1 9 3 4 5 6 7 8 2"
# ...
EndSection
Changing the order of the numbers changes the behaviour of the mouse buttons. Yet I cannot find any documentation that describes how the behaviour is assigned. What little documentation there is, I helped write.
For example, if the button mapping was written thus:
Option "ButtonMapping" "a b c d e f g h i"
We would document these positions as:
- a - Left click
- b - Middle
- c - Right click
- d - Scroll forward
- e - Scroll backward
- f - Forward
- g - Backward
- h - Horizontal scroll
- i - Vertical scroll
My question then: what do the positional values of a through i actually represent and how are they mapped to mouse buttons?
Update
Running xmodmap -pp shows:
$ xmodmap -pp
There are 10 pointer buttons defined.
Physical Button
Button Code
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
This is not useful as it contains no information a human can use about the physical attributes of the mouse (i.e., showing two columns of numbers is useless without button names, such as "left button"). So while technically this might answer the question of "how are they mapped", the question remains unanswered in any practical sense.