Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Logitech MX-510, that I've been using for about six years.

Logitech MX-510

The Mouse has several extra buttons, that I'd like to use in Gnome, but I have problems with the button codes, that the mouse sends to the driver:

  • Button 1 (mouse wheel button) works as expected. One ButtonPress event with state 0x10 and button 1 on press, and ButtonRelease with state 0x110on release.

  • Button 2 (mouse wheel button) works as expected. One ButtonPress event with state 0x10 and button 2 on press, and ButtonRelease with state 0x210on release.

  • Button 3 (right button) works as expected. One ButtonPress event with state 0x10 and button 3 on press, and ButtonRelease with state 0x410on release.

  • Button 4 (scroll up) works as expected. It sends a ButtonPress event with state 0x10 and button 4, and a ButtonRelease event with state 0x810. Both events occur instantaneous on each scroll step.

  • Button 5 (scroll down) works as expected. It sends a ButtonPress event with state 0x10 and button 5, and a ButtonRelease event with state 0x1010. Both events occur instantaneous on each scroll step.

Buttons 6 and 7 seem to not exist.

  • Button 8 (back button) works as expected. It sends a ButtonPress event with state 0x10 and button 8, and a ButtonRelease event also with state 0x10. Both events occur instantaneous on each scroll step.

  • Button 9 (back button) works as expected. It sends a ButtonPress event with state 0x10 and button 9, and a ButtonRelease event also with state 0x10. Both events occur instantaneous on each scroll step.

The mouse has three additional buttons, as you can see in the picture above.

  • Button 10 (on the very top of the mouse) is not usable. It sends a ButtonPress event with state 0x10 and button 10, and a ButtonRelease event also with state 0x10. The button is not usable with Gnome, because it is not selectable. Most option selectors, like that one of CompizConfig Settings Manager just goes up to Button 9.

  • Button 11 (extra button to the front of the mouse wheel) is not quite usable. When pressed, it sends a ButtonPress event with state 0x10 and button 11, and another ButtonPress event with state 0x10 and button 4 and yet another one ButtonPress event with state 0x810 and button 4 (the last two being the same behaviour as if the scroll wheel was moved one step up). On release it sends a ButtonRelease event with state 0x10 and button 11. But the catch is, when the button is held down, it repeats the "mouse wheel simulation" about five times per second. (like a mousewheel cruise-control or something).

  • Button 12 (extra button to the back of the mouse wheel) is not quite usable. When pressed, it sends a ButtonPress event with state 0x10 and button 12, and another ButtonPress event with state 0x10 and button 5 and yet another one ButtonPress event with state 0x1010 and button 5 (the last two being the same behaviour as if the scroll wheel was moved one step up). On release it sends a ButtonRelease event with state 0x10 and button 12. When held down it displays the same cruise-control behavior as button 11, but with the respective button and state parameters.

Is there a way how I can remap those additional keys in a way, where I can use them or make them usable with Gnome? And especially, if it is possible, to make buttons 11 and 12 stop sending codes for mouse wheel scroll up and down. And if possible, how can I change the general behavior of the mouse buttons in general?

share|improve this question
    
I just booted into windows, installed the Logitech drivers and tried to set those two buttons to something else, which does not need repetitive "autofire". But it didn't help. The state numbers all changed though. –  polemon Apr 11 '11 at 4:53
add comment

2 Answers

You need to use lomoco to make permanent changes (such as stopping buttons 11 and 12 from sending scroll wheel events.) You may have to run lomoco at startup to keep the changes. I did this with my MX1000.

You can use xmodmap to remap buttons, if you want buttons 6 and 7 assigned (which are normally treated as horizontal scrolling under X.)

share|improve this answer
    
Problem is, lomoco doesn't compile, since Linux doesn't support STREAMS (stropts.h) –  polemon Apr 17 '11 at 6:17
    
@polemon: Compiles fine for me - are you using the "download version 1.0" link from the homepage? –  Malvineous Apr 18 '11 at 0:53
    
@Malvineous: yes –  polemon Apr 18 '11 at 6:27
    
@polemon: Sounds like you're missing some header files then, maybe your distro has -dev packages you need to install before you can compile it? I tried it under Gentoo with no problems. Maybe your distro already has a package for it. –  Malvineous Apr 19 '11 at 2:58
    
I checked all of them. They're only available for cross compiling purposes. The standard Linux headers do not include them anymore. A fairly new distro doesn't have them in the repos or anywhere. The 1.0 version is just too old. :( –  polemon Apr 20 '11 at 12:38
show 1 more comment

(I have an Mx518 myself, and I'm making some assumptions about the 500 based on my 518.)

The two buttons immediately forward and behind the wheel are intended to control the DPI of the mouse. Since this appears to be done in the hardware itself, I don't know if it's advisable to use them for anything else.

You may be able to use lmctl to configure the topmost button or the wheel-flanking buttons. There's another program called logitech_applet but I've never used it

share|improve this answer
1  
The MX510 had no adjustable resolution. Those two buttons you're talking about had a totally different function on the MX-510 (I know both mice, MX-510 and MX-518). –  polemon Apr 11 '11 at 12:41
    
I see. Well one of the two programs I mentioned may be able to map them then. –  Amazed Apr 11 '11 at 17:52
    
lmctl is long dead. The subsequent project, [lomoco], seems to be unmaintained, somewhat at the moment, yet it still sees development. However, I don't seem able to build the cloned build repo. The release is so old, it won't compile. –  polemon Apr 12 '11 at 4:23
    
@polemon: Make sure you're using the original lomoco, not the rewrite which currently doesn't compile. I don't think the original lomoco is under version control. –  Malvineous Apr 17 '11 at 5:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.