xkb is for the keyboard. See
What is it for?
xmodmap is not wrong. See for instance
map mouse on linux.
Perhaps you're thinking about xorg.conf?
I have a Razer gaming mouse and my xorg.conf file looks like this (for the mouse part):
Code:
Section "InputClass"
Identifier "R.A.T.7 Mouse Remap"
MatchProduct "R.A.T.7"
MatchDevicePath "/dev/input/event*"
Option "Buttons" "17"
Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 7 6 12 0 0 0 16 17"
Option "ZAxisMapping" "4 5 6 7"
Option "AutoReleaseButtons" "13 14 15"
EndSection
I'm
guessing that the xmodmap settings you have there ends up as the line called: Option "ButtonMapping"