Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 08-14-2003, 02:01 AM   #1
LQ Newbie
Registered: Aug 2003
Posts: 2

Rep: Reputation: 0
Unhappy 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"

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.
Old 08-14-2003, 07:04 PM   #2
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
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"

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.

Last edited by maroonbaboon; 08-14-2003 at 08:31 PM.
Old 08-14-2003, 09:14 PM   #3
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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"

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.
Old 08-14-2003, 09:37 PM   #4
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
There is a much longer active thread on this elsewhere in this forum
Old 11-28-2004, 11:24 AM   #5
Registered: Jul 2004
Location: New York, NY
Distribution: Ubuntu
Posts: 67

Rep: Reputation: 16
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
xmodmap chrismiceli Linux - Software 2 06-29-2006 03:18 AM
xmodmap help pitt30 Slackware 11 01-14-2005 04:54 AM
xmodmap snt Linux - Software 0 11-15-2004 08:59 AM
xmodmap ntilde Mandriva 0 07-27-2004 01:28 PM
modification to .Xmodmap butthead Programming 0 02-01-2002 08:50 AM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration