LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   xmodmap does not work (http://www.linuxquestions.org/questions/linux-hardware-18/xmodmap-does-not-work-81840/)

Takalah 08-14-2003 02:01 AM

xmodmap does not work
 
I have been trying to get the side button on my logitech cordless optical mouse to work. I'm running Mandrake 9.1 with KDE. My XF86Config-4 mouse section is as follows
Section "InputDevice"
Identifier "USB Mouse"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/usbmouse"
Option "Buttons" "6"
Option "ZAxisMapping" "5 6"
Option "Emulate3Buttons" "no"
EndSection

I run xev and all six buttons are recognized. I then tryed to remap the buttons so that I can scroll with the mousewheel and have the side button which is recognized as button 4 mapped to button 6. So I used the command xmodmap -e "pointer = 1 2 3 6 4 5" but the wheel still doesn't work. I checked the mapping with xmodmap -pp and it shows that the buttons have in fact been remapped, but they don't work as if they have been remapped. In fact no matter what I set the pointer = in xmodmap the buttons still function as if they were unmapped.

maroonbaboon 08-14-2003 07:04 PM

I have a ps2 Intellimouse Explorer and KDE, with the wheel working perfectly with the following XF86Config-4 and no remapping

Section "InputDevice"
Identifier "PS/2 Mouse"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "ZAxisMapping" "4 5"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "true"
Option "Emulate3Timeout" "70"
Option "SendCoreEvents" "true"
EndSection

I count 7 buttons on the mouse, and xev tells me that 4 and 5 come from the wheel and with this config the two extra side buttons are disabled. I can reverse the scroll direction using xmodmap as you describe to swap 4 and 5.

But I see you have an Explorer protocol with a Logitech mouse. If that's right maybe you should try changing the ZAxisMapping to the Explorer setting also and see what happens.

Later: this got my interest and I wanted to enable the other two buttons on my IM Explorer. It seems I have to change the ZAxismapping to 6 7 and the protocol to ExplorerPS/2. But as you note applications seem to expect wheel events from 4 and 5. In my case xmodmap works (although I can't find a good place to put the command to run automatically).

There is some discussion on the KDE mailing lists (search imwheel) as it seems there was a known problem with this in KDE before v2. My version is 3.1.2. Sorry I can't help more.

leonscape 08-14-2003 09:14 PM

Six? Its usually seven, because normally you can press the middle wheel down to act as a seventh button.

This works with my Explorer mouse, and now everthing works.

My XF86Config-4 for the mouse is:
Section "InputDevice"
Identifier "USB Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
EndSection

and my start up script has

xmodmap -e "pointer = 1 2 3 6 7 4 5"

Then to actually use the side buttons I'm using imwheel. I start it up in the same script with:
imwheel -k -b "67"

and the imwheelrc file has:
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

Now everthing works fine. of couse you can set the imwheelrc file to force out other key combinations for the extra mouse buttons.

This should also work for the logitech I think although YMMV.

maroonbaboon 08-14-2003 09:37 PM

There is a much longer active thread on this elsewhere in this forum

http://www.linuxquestions.org/questi...threadid=21303

bleargh 11-28-2004 11:24 AM

I bet your problem is the same as mine. xmodmap only affects the CorePointer. mine is behaving exactly the same way since my laptop's touchpad is the CorePointer. if you have more than one mouse, see if the buttons are swapped on the other mouse. let me know if you have found a way around this.


All times are GMT -5. The time now is 12:55 PM.