binding extra buttons on linux
Moderators: Forum moderators, developers
binding extra buttons on linux
I use linux and I would like to bind some buttons that can't be bound normally, like mouse6 (and if possible the left "win" button on the keyboard). I have tried to use tools like xvkbd to associate mouse6 to a keyboard button, and it works fine (when I press mouse6 I get the associated keyboard button "pressed") but only in the window manager; in ET such tools have no effect. Any suggestions from the linux users in the forum?
I think there are a couple of ways to do the bindings, the way you could do it is:
Check that you have the right number of buttons ( 6 in your case ) in the mouse section of your xorg.conf. Then set ZAxisMapping for 5 and 6.
Create a file called .xmodmap in your home directory. Write
into that file. Then run that file using xmodmap command:
That's it, now you can bind mouse4 in ET. If you don't want to manually do the xmodmapping every time you restart X, you can insert the xmodmap .xmodmap command into your .xinitrc file.
Hope this helps, it works for me with MX1000 and for a friend of mine with a 4 button mouse similar to MX310.
Check that you have the right number of buttons ( 6 in your case ) in the mouse section of your xorg.conf. Then set ZAxisMapping for 5 and 6.
Code: Select all
Option "Buttons" "6"
Option "ZAxisMapping" "5 6"
Code: Select all
pointer = 1 2 3 6 4 5
Code: Select all
xmodmap .xmodmap
Hope this helps, it works for me with MX1000 and for a friend of mine with a 4 button mouse similar to MX310.
Sorry, probably I didn't explain well my problem: I already bound mouse4 and mouse5, using the method you described. What I want to do is to bind my sixth mouse button, which is normally not possible because mouse6 is not a valid key for enemy territory. I know that on windows this can be done by associating a keyboard button (let's say "p") to the mouse button, so that every time you press your sixth button a "p" key press event is sent to the game; so all you have to do is to bind something to "p". On linux this is possible too, but it only works (at least the method I have tried, with xvkbd http://www.linux-gamers.net/modules/wfs ... ticleid=46) in the windows manager, not in the game. Hope this is more clear now.
https://wiki.ubuntu.com/MultimediaKeys This might help you with the Win key.
Wow thanks you are right, kp_equals corresponds to mouse6
Also, after reading the xmodmap man page I wrote the following file for xmodmap:
which maps = to the left win key, and / to the right key (useful since, with my italian keyboard, the "/" is usually done by pressing shift+7 ) so I can just bind stuff to "=".
Also, after reading the xmodmap man page I wrote the following file for xmodmap:
Code: Select all
clear mod4
keycode 115 = equal
keycode 116 = slash