Bug 119018 - xmodmap fails to remap USB mice buttons
Summary: xmodmap fails to remap USB mice buttons
Alias: None
Product: Fedora
Classification: Fedora
Component: XFree86   
(Show other bugs)
Version: 1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2004-03-23 22:01 UTC by michael s. williamson
Modified: 2007-11-30 22:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-12 18:03:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description michael s. williamson 2004-03-23 22:01:46 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

Description of problem:
Neither the 'mouse preferences' widget nor xmodmap can remap the
buttons of a USB mouse for left-handed use.  Also tested against SuSe
live Eval 9.0 rc1 and xmodmap worked properly on my USB mouse there.

Using xmodmap -e "pointer = 3 2 1 4 5" I should be able to remap the
mouse buttons (wheel mouse).  Even xmodmap -pp shows that it thinks
the mouse is remapped:

[mwilliamson@puffin mwilliamson]$ xmodmap -e "pointer = 3 2 1 4 5"
[mwilliamson@puffin mwilliamson]$ xmodmap -pp
There are 5 pointer buttons defined.
    Physical        Button
     Button          Code
        1              3
        2              2
        3              1
        4              4
        5              5

But alas, the mouse still behaves as a right-handed mouse.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Install a USB mouse
2.Attempt to swap right and left buttons via preferences -- fails
3.Attempt to swap right and left buttons via xmodmap -- also fails

Actual Results:  Mouse still right handed

Expected Results:  Mouse should have been left handed

Additional info:

Oddly, if I plug in both a PS/2 mouse and my USB mouse, xmodmap remaps
the PS/2 mouse while leaving the USB one unaffected.

Comment 1 Mike A. Harris 2004-03-30 22:32:03 UTC
Can you review bug #119217 and bug #119295 to see if you can reproduce
either of those issues, and wether they may be related to the problem
you're experiencing?  I believe all 3 of these bugs may be duplicates
of each other.

Comment 2 michael s. williamson 2004-03-30 23:40:32 UTC
Actually, xmodmap is working fine as I use it to map my keyboard to
dvorak.  the pointer argument correctly maps my PS/2 mouse as
expected, but has no effect on the USB mouse.

Comment 3 Behdad Esfahbod 2004-03-31 03:31:07 UTC
I can't reproduce this bug.  I'm running xorg and the mentioned
xmodmap command changed the left and right keys for both my touchpad
and USB mouse.

Oh, well, I have my /dev/input/mice as CorePointer, which under 2.6
generates the events for both touchpad and USB mouse.

Michael, can you edit your /etc/X11/XF86Config and in ServerLayout
section, change the USB mouse to CorePointer and the other one
(Mouse0?)  to AlwaysCore, and test both mouses again?

Comment 4 michael s. williamson 2004-03-31 14:38:44 UTC
Ok, after making these changes xmodmap remaps the USB mouse, but not
the PS/2 mouse.  (I generally only use the USB mouse anyway however)

here's the section from my XF86Config:

Section "ServerLayout"
        Identifier     "single head configuration"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "AlwaysCore"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "DevInputMice" "CorePointer"

Comment 5 Behdad Esfahbod 2004-03-31 16:28:45 UTC
Thanks.  So it's better called an xorg bug, that should be reported
upstream on bugzilla.freedesktop.org.

I'm not sure what does system-config-mouse do right now, but with 2.6,
/dev/input/mice should be enough, and as CorePointer, right?  This way
the problem will not show.

Comment 6 Mike A. Harris 2004-04-06 06:06:23 UTC
Actually, this appears to just be a config file issue, and not
an X server issue at all.  The config file from XFree86 4.3.0 is not
going to work 100% properly with Xorg X11 under a 2.6 kernel, as
2.6 has changed many things.

Please rerun "system-config-display --reconfig" to generate a
completely brand new config file from scratch, and try that.

Attach your complete new config file after that, and the X server
log from starting up X, and I'll have another look.  I think this
should probably get reassigned to system-config-display though,
as it is the job of the config tool to make sure the X server
is configured properly, even if the kernel changes, etc. in a way
that makes the config no longer work.  The X server can only do
what the config file is telling it to do under the constraints of
the running kernel.

Thanks for testing guys.

Comment 7 Behdad Esfahbod 2004-04-06 07:14:25 UTC
You are right that it's s-c-d's job to make sure the config works, but
something that looks to me like a possible xorg bug is that xmodmap
does not affect mouses defined as AlwaysCore, but only works on
CorePointer.  But that's another story.

Comment 8 Mike A. Harris 2004-04-06 07:52:20 UTC
I just reread this bug report, and realized it is not filed against
Xorg X11 at all.  It's filed against FC1/XFree86.  I guess I'm used
to all incoming reports being for our current developmental bits
that I must have missed that.

Comment 9 Mike A. Harris 2004-10-12 18:03:04 UTC
Since this bugzilla report was filed, there have been several major
updates to the X Window System, which may resolve this issue.  Users
who have experienced this problem are encouraged to upgrade to the
latest version of Fedora Core, which can be obtained from:


If this issue turns out to still be reproduceable in the latest
version of Fedora Core, please file a bug report in the X.Org
bugzilla located at http://bugs.freedesktop.org in the "xorg"

Once you've filed your bug report to X.Org, if you paste the new
bug URL here, Red Hat will continue to track the issue in the
centralized X.Org bug tracker, and will review any bug fixes that
become available for consideration in future updates.

Note You need to log in before you can comment on or make changes to this bug.