Forums » Linux

Mouse buttons

Nov 11, 2007 vardonx link
I have a Logitech MX620 mouse. I have it working under Suse 10.x. If I run xev I can see all 9 button clicks and releases.

Problem is in VO I can't seem to use any buttons but left, middle, right, and the scroll wheel. I was told that the extra buttons are XMBUTTON1, XMBUTTON2, etc. If I bind these to a command (+Shoot3 for instance) they never fire.

Anyone have any ideas?
Nov 11, 2007 vardonx link
As a follow up, I used xmodmap to change the mapping order to map button 8 as the middle mouse button and that works ok. So the issue seems to be not the mouse itself, but how the buttons get mapped in VO.

Here is what I am trying:

/bind XMBUTTON5 +Shoot3

Is that not correct?
Nov 12, 2007 raybondo link
Can you post the output of xev? Maybe the event ids we're using are different.
What you are doing should be correct.
Nov 12, 2007 vardonx link
Ray,

Here's the xev output for all 9 buttons. The mouse is a Logitech MX620, and I am using Suse Linux 10. For now I have mapped button 8 (one of the thumb buttons) to the middle button position (normally the wheel click or button 2) in order to be able to use it in game.

As I said, no matter what the button order, VO only sees the first 3 buttons plus the wheel scroll evens (buttons 4&5). Other Linux apps, like Firefox, can see those events plus wheel left and right -- so the mouse appears to be working fine from a Linux perspective.

Thanks for the help!

xev output follows:

BUTTON 1: (LEFT BUTTON)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96724749, (31,28), root:(1129,823),
state 0x10, button 1, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96724749, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 272

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96724973, (31,28), root:(1129,823),
state 0x110, button 1, same_screen YES

BUTTON 3: (RIGHT BUTTON)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96725541, (31,28), root:(1129,823),
state 0x10, button 3, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96725541, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 1040

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96725813, (31,28), root:(1129,823),
state 0x410, button 3, same_screen YES

BUTTON 8: (WHEEL CLICK - NORMALLY THIS WOULD BE BUTTON 2, BUT I CHANGED MAP ORDER )

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96728972, (31,28), root:(1129,823),
state 0x10, button 8, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96728972, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 16

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96729164, (31,28), root:(1129,823),
state 0x10, button 8, same_screen YES

BUTTON 5: (WHEEL)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96730748, (31,28), root:(1129,823),
state 0x10, button 5, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96730748, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 4112

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96730748, (31,28), root:(1129,823),
state 0x1010, button 5, same_screen YES

BUTTON 4: (WHEEL)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96731244, (31,28), root:(1129,823),
state 0x10, button 4, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96731244, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 2064

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96731244, (31,28), root:(1129,823),
state 0x810, button 4, same_screen YES

BUTTON 6: (WHEEL LEFT)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96732924, (31,28), root:(1129,823),
state 0x10, button 6, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96732924, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 16

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96732924, (31,28), root:(1129,823),
state 0x10, button 6, same_screen YES

BUTTON 7: (WHEEL RIGHT)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96734179, (31,28), root:(1129,823),
state 0x10, button 7, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 96734179, (31,28), root:(1129,823),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 16

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 96734179, (31,28), root:(1129,823),
state 0x10, button 7, same_screen YES

BUTTON 2: (THUMB BUTTON 2 - NORMALLY THIS WOULD BE BUTTON 8)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 97228691, (49,41), root:(1147,836),
state 0x10, button 2, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 97228691, (49,41), root:(1147,836),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 528

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 4294967283 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 97228915, (49,41), root:(1147,836),
state 0x210, button 2, same_screen YES

BUTTON 9: (THUMB BUTTON 1)

ButtonPress event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 97230531, (49,41), root:(1147,836),
state 0x10, button 9, same_screen YES

EnterNotify event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x0, time 97230531, (49,41), root:(1147,836),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 16

KeymapNotify event, serial 30, synthetic NO, window 0x0,
keys: 72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ButtonRelease event, serial 30, synthetic NO, window 0x3600001,
root 0x48, subw 0x3600002, time 97230763, (49,41), root:(1147,836),
state 0x10, button 9, same_screen YES
Nov 13, 2007 raybondo link
Weird, it doesn't show what the event ids actually are. I was expecting some 32 bit number.

What are you doing with xmodmap to change your keys? I am not 100% familiar with using that.

Hmm, looking at the X code, this is the button order:
Button 1: LMBUTTON
Button 2: MMBUTTON
Button 3: RMBUTTON
Button 4: MWHEELUP
Button 5: MWHEELDOWN
Button 6: XMBUTTON1
Button 7: XMBUTTON2
Button 8: XMBUTTON3
Button 9: XMBUTTON4
Button 10: XMBUTTON5
Button 11: XMBUTTON6
Button 12: XMBUTTON7
Button 13: XMBUTTON8

Where Button X is the button value from X and LMBUTTON,etc... are the names in VO.

Do the higher buttons show up if you use the bind interface in Options->Keyboard?
Nov 13, 2007 vardonx link
Odd, if I bind them that way the work ok?

Oh, well -- they work that's the important thing. Thanks for the help Ray.

Next project is getting my new G15 keyboard working. I have to get g15tools running on the linux box, but are there any tricks to using the G keys in VO, and will VO write to the display?
Nov 14, 2007 raybondo link
This is a thread about the G keys on a Logitech G15 keyboard in Linux.
http://www.vendetta-online.com/x/msgboard/6/17614

I do not have LCD output working in Linux, though. I'm using win32 API calls to render text in the windows version and haven't written replacement functions.
Nov 15, 2007 vardonx link
I saw the other thread.

Just wanted to comment that I have the same issue as logrus as far as binding the G keys. I can bind them manually, but I cannot bind them through the UI.

Keep up the good work!