Summary: | evdev, xmodmap mouse button map applied twice? | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Pekka Paalanen <ppaalanen> | ||||
Component: | Input/evdev | Assignee: | Peter Hutterer <peter.hutterer> | ||||
Status: | CLOSED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | normal | ||||||
Priority: | medium | Keywords: | patch | ||||
Version: | git | ||||||
Hardware: | x86-64 (AMD64) | ||||||
OS: | Linux (All) | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Pekka Paalanen
2009-02-15 03:55:04 UTC
git master has double button mapping. One applies to the virtual core pointer (i.e. the cursor) and one applies to specific devices. The button mappings are chained, so you can have the mapping on a device and have a different mapping on the VCP and the final is the combination of both mappings. I think that's what's hitting you, though I got a bit confused with the definitions of "wrong way round" in your report. try xinput --set-button-map "device name" 1 11 3 4 5 etc. (device name as listed by "xinput --list --short"). Does that work? "Wrong way around" just means that I want the buttons 2 and 11 swapped, when they are not. Um, this is what happens, and it doesn't look right to me. First I have my old settings in my Xorg session's Xmodmap: pointer = 1 11 3 4 5 9 8 6 7 10 2 12 Then I run these commands: $ xinput --list --short "Virtual core pointer" id=0 [XPointer] "Virtual core keyboard" id=1 [XKeyboard] "AT Translated Set 2 keyboard" id=2 [XExtensionKeyboard] "Logitech USB-PS/2 Optical Mouse" id=3 [XExtensionPointer] $ xinput get-button-map "Virtual core pointer" 1 11 3 4 5 9 8 6 7 10 2 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 $ xinput get-button-map "Logitech USB-PS/2 Optical Mouse" 1 11 3 4 5 9 8 6 7 10 2 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 $ xinput set-button-map "Virtual core pointer" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 $ xinput get-button-map "Logitech USB-PS/2 Optical Mouse" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 $ xinput get-button-map "Virtual core pointer" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Setting the button map seems to set both maps at the same time. Should I update xorg-server or xf86-input-evdev from git/master just to be sure? Created attachment 23143 [details] [review] 0001-dix-don-t-apply-button-mappings-to-SDs-or-the-devi.patch Yeah, you're right - this is wrong. This behaviour got changed in bc909f71367a02297e725bb5769c2bcadab22395, and IMO I don't think it's the right thing to do, we should only change the device we're interested in. Please try this (untested) patch on your xserver, it should revert to the old behaviour. (In reply to comment #3) > Created an attachment (id=23143) [details] > 0001-dix-don-t-apply-button-mappings-to-SDs-or-the-devi.patch That patch indeed fixes it. Now everything works as I would expect: xmodmap changes the virtual core pointer button mapping, and I can use xinput to change the mapping on the specific device. As a bonus, now I know how I can change the mapping on *this* mouse instead of all mice :-) But one question here remains: is it possible to configure this automatically, if I plug this mouse in in the middle of my X session? I could put the button mapping in HAL config, so it would (I guess) be applied on device discovery, but this is a global setting, not per user. Right? It is my personal preference on this particular mouse to swap those buttons. Can that configuration be automated? (Just thinking out loud here.) Thanks. When I see this patch hit xorg-server git, I'll retest and mark as fixed. Patch pushed as a50c40be1f28467bcef7dc71fab54ebdddacffdf. > --- Comment #4 from Pekka Paalanen <pq@iki.fi> 2009-02-21 04:36:47 PST ---
> But one question here remains: is it possible to configure this
> automatically, if I plug this mouse in in the middle of my X session?
> I could put the button mapping in HAL config, so it would (I guess) be applied
> on device discovery, but this is a global setting, not per user. Right?
> It is my personal preference on this particular mouse to swap those buttons.
> Can that configuration be automated? (Just thinking out loud here.)
I guess the desktop environment could provide an ui for this, listen to
notifications for when new devices appear, and apply the user's
settings.
Re-tested on xorg-server master branch, is fixed. Closing. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.