linux + mouse buttons ingame?

hello guys,
its a known fact that all you guys from crossfire got mice for hundreds of euros, so i'd like to ask these of you who play et on linux, how do you deal with additional buttons in enemy territory.

you know, side buttons mouse4 and mouse5 (and even more in many mice, these two would do for me as i have my good old a4t x7)

my gameplay pretty much is based on these two buttons and it is crucial for me to have them running if i seriously consider playing et on linux and in the closer and further perspective - leaving windows at all.

please, note that i can configure side buttons to work in a system itself, a bit playing with xorg.conf and some random commands was enough, but the problem is in et.

cheers
Comments
18
can you bind them in the game manu? on ubuntu they are not called mouse 4&5, i cant remeber the name KP_something
hmm oh thats a good call, didnt come to my mind tbh :d

ill check it! thank you, you are my favourite Klapp :)
Parent
to bind the 6th mouse button you can use kp_equals, but I'm pretty sure the 4th and 5th are still called mouse4 and mouse5
Parent
ok, im on linux right now.
i went to options -> controls and it seems that both side buttons are available as one and the same key: KP_EQUALS. that's like having one arm :d

(btw, what minimizor to use? will etswitch do or there's some other uber program? :))
Parent
Probably the side buttons are considered te 6th and 7th , and that's why they are both recognized as kp_equals

open a terminal window and launch xev , then click your side buttons in the window that appears and read the output in the terminal, you'll be able to see to what they are mapped (i.e. mouse6 or mouse5 or whatever)

if you see they have the wrong numbers, create in your home directory a file called .xmap , and write something like

pointer = 1 2 3 4 5 6 7 8 9

where you swap the numbers accordingly, so for example if you see that the side buttons are mouse6 and mouse7 and you want them to be mouse4 and mouse5 you'll change it to

pointer = 1 2 3 6 7 4 5 8 9

save the file and issue the command
xmodmap .xmap

now launch xev again and you should see that your side buttons are recognized as mouse4 and 5, and you can bind them as such from et

if it works, just place the command xmodmap .xmap somewhere where it will be executed automatically
Parent
i've been messing around with xmodmap and xev | grep button whole day, but ill try again. but tell me, do i need to touch xorg.conf in addition to your tips?

i understand i should use evdev driver?
Parent
Yeah evdev is the best
Parent
the whole problem is that 4 and 5 are reserved for scrolling wheelup and wheeldown. thats why side buttons are as far as 6 and 7.
if i order it like that: xmodmap -e "pointer 1 2 3 6 7 4 5 8 9" then nothing works.
if i order it like that: xmodmap -e "pointer 1 2 3 6 7 8 9 4 5" then i have scrolling at side buttons and forward/backwards in browser on mouse scroll (so inverse :d)
if i order it like that: xmodmap -e "pointer 1 2 3 4 5 8 9 6 7" then its all fine (scrolling scrolls and side buttons navigate history).

(sidenote: the question is "wtf are these 8 and 9?" i dont even have such buttons. what im going to do next is editing xorg.conf to inform it how many physical buttons i have, ill see what it changes).

great - it works but only in system itself (i managed to do that during the day).
the problem is ET - having each of these 3 orders above i launched ET to check'em. it seems, ET is completely ignoring xmodmap, because it was always the same - scrolling up and down worked like always, changing controls in et options was like always -> side buttons were still KP_EQUALS - even when in system it was inversed (2nd order of pointer from above).

does that mean ET ignores system settings regarding mouse?
Parent
Are you launching et in a separete x server? Otherwise the xset settings should work, the only thing that is ignored by et is xset m xxx (to set acceleration) but the remapping of buttons should work
Parent
i dont know how to launch et in a separate x server, so if im doing it its unintentional :D
i mean, i just click the activator from the menu that points to /usr/local/games/enemy-territory//et (i added +set fs_game etpro so that it loads as etpro).

btw, by separate x server you dont mean "launching et in second desktop"?
Parent
Yes, indeed. x configuration won't affect ET in any way. You have to bind them lower-level to keyboard buttons.

You got quite a few possibilites. Back in 2007 I used evrouter and kbde kernel driver, but that's quite advanced configuration :p ( I wrote about it at some wiki - http://wiki.archlinux.org/index.php/Get_All_Mouse_Buttons_Working#Binding_keyboard_to_mouse_buttons - but it's not of a best quality tbh - I think there are some bugs in my explanation iirc ) but nowadays there are better methods to do it, I think there was some wannabe linux driver for logitech mices which was including option to bind buttons to keyboard ones without any hassle.

I am not aware of any method to just bind them in ET, there are always detected as KP_EQUALS.
Parent
Hello :)

I have already seen that tutorial (I guess I have seen them all :D), and started doing what it tells me to from the header "Why standard methods are not enough?", because I understood from the context that "xvkbd and xbindkeys" is about system and wont work in ET (am I right?).

Installation of evrouter went smoothly as there is deb pack, but I failed at compiling kbde-driver, it throwed me two errors and the explanation of installation in INSTALL file and on the kbde's homepage... I just cant get it :( I know it's something with my kernel version, so I tried to add that MODULE_KERNEL_VERSION (2.6.28-15-generic, its jaunty) but still errors so I left it for a while. Unfortunately it seems this is the only way to make my side buttons work, so I got to figure out what to do.
Parent
Yeah you're right about that xvkbd and xbindkeys aren't enough for ET.

Well, you're on the quite good track to compile it ;) I remember I had a lot of problems myself to compile it after kernel changed - there was something with this kernel attribute but I don't really remember what exactly, though I do remember there was always some hassle with it.

Unfortunately, I don't have linux anymore at home, though I could compile it remotely on server or my work computer when will be back at home today.

But as I said I'm almost sure there was some wannabe linux driver in the meantime which was giving such possibility, I haven't tested it so don't know whether it is enough low-level (i.e. x-server independent) to work in ET, but it still might be worth a try.
Parent
I'll surely check it hoping it works as I have a4tech and you mentioned it's for Logitech :)
Parent
in etc/X11/xorg.conf:

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "Buttons" "10"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "false"
Option "ButtonMapping" "1 2 3 6 7 8 9 10 4 5"
Option "Name" "mx518"
EndSection
that wont work :)
it crashes my x window
Parent
mx518 i have 2 sidebuttons but both are called KP_EQUALS so i use only 1 of them^^

if u play ET pls be sure that u have in_dgamouse 2
is for the accelation^^
means it adds acceleration or removes it? :)
ah so it feels like in windows, before you told me that command, i had to cut my sensitivity in cfg by half, now it seems the same.
Parent
Back to top