don't invert mightymouse hwheel
PATCH 1/1 don't invert mightymouse hwheel
Commit a82e49b8aeb9f8dafdf6cf2e617c8b95bf056257 said:
Further, the quirks for the Apple Mighty Mouse are not quite right: the horizontal scrolling needs its axis reversed, and the left and center buttons are transposed.
This is not true. With this X configuration:
Section "InputDevice"
Identifier "EvDev"
Driver "evdev"
Option "SendCoreEvents" "true"
Option "evBits" "+1-2"
Option "keyBits" "~272-287"
Option "relBits" "~0-2 ~6 ~8"
Option "Pass" "3"
EndSection
I can scroll up in a window by moving my finger up, and scroll left in a window by moving my finger right. That makes no sense, this patch therefore removes the INVERT_HWHEEL quirk from the USB mightymouse.
I didn't change the bluetooth mightymouse, maybe it has this quirk after all. My USB one definitely doesn't. If the bluetooth version doesn't have that quirk either, we can completely remove the INVERT_HWHEEL quirk.
--- drivers/usb/input/hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/input/hid-core.c +1 -1
@@ -898,7 +898,7 @@ static const struct hid_blacklist { { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT }, - { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL }, + { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE }, { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 }, { USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE, HID_QUIRK_2WHEEL_MOUSE_HACK_5 },
Quoted 14 lines · Johannes Berg
This is not true. With this X configuration:
Section "InputDevice"
Identifier "EvDev"
Driver "evdev"
Option "SendCoreEvents" "true"
Option "evBits" "+1-2"
Option "keyBits" "~272-287"
Option "relBits" "~0-2 ~6 ~8"
Option "Pass" "3"
EndSection
I can scroll up in a window by moving my finger up, and scroll left in a window by moving my finger right. That makes no sense, this patch therefore removes theINVERT_HWHEELquirk from the USB mightymouse.
Johannes, Bart,
I unfortunately don't have the hardware in question to test with. This X configuration is of course perfectly valid.
Bart, as you wrote the original patch which inverted the wheel, could you provide some more information please? It seems to me that you guys have different versions of mightymouse ... but I wouldn't believe they would have the same PID :)
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 19 lines · In message <[email protected]> you wrote:
Quoted 14 lines · Johannes Berg
This is not true. With this X configuration:
Section "InputDevice"
Identifier "EvDev"
Driver "evdev"
Option "SendCoreEvents" "true"
Option "evBits" "+1-2"
Option "keyBits" "~272-287"
Option "relBits" "~0-2 ~6 ~8"
Option "Pass" "3"
EndSection
I can scroll up in a window by moving my finger up, and scroll left in a window by moving my finger right. That makes no sense, this patch therefore removes theINVERT_HWHEELquirk from the USB mightymouse.Johannes, Bart,
Quoted 7 lines
I unfortunately don't have the hardware in question to test with. This X configuration is of course perfectly valid.
Bart, as you wrote the original patch which inverted the wheel, could you provide some more information please? It seems to me that you guys have different versions of mightymouse ... but I wouldn't believe they would have the same PID :)
Give me a day or so to check all this out. I don't think looking at the X behavior is too useful: too many place that the direction can be swapped. Instead, look which way the bits coming directly out of evdev point. IIRC I set things up so that positive X was the same as on other evdev devices. Is the supplied X config swapping the X axis with this line?
Quoted 1 line
Quoted 1 line
Option "evBits" "+1-2"
One possible source of confusion is that Iceweasel scrolls backward by default (on all devices, not just MM). You can fix this by changing a setting in the Iceweasel config.
Bart
Quoted 2 lines · Barton C Massey
Quoted 2 lines
I unfortunately don't have the hardware in question to test with. This X configuration is of course perfectly valid.
I copied it straight out of the manpage so I'd hope so :>
Quoted 4 lines
Give me a day or so to check all this out. I don't think looking at the X behavior is too useful: too many place that the direction can be swapped. Instead, look which way the bits coming directly out of evdev point.
I can do that (early next week), but I don't have any other devices to test with. Can provide a dump.
Quoted 6 lines
IIRC I set things
up so that positive X was the same as on other evdev devices. Is the supplied X config swapping the X axis with this line?Quoted 1 line
Quoted 1 line
Option "evBits" "+1-2"
No idea! I just copied it out of the manpage from evdev(4)
Quoted 3 lines
One possible source of confusion is that Iceweasel scrolls backward by default (on all devices, not just MM). You can fix this by changing a setting in the Iceweasel config.
I didn't use Iceweasel but GTK.
johannes
Quoted 15 lines · Johannes Berg
Quoted 2 lines · Barton C Massey
Quoted 2 lines
I unfortunately don't have the hardware in question to test with. This X configuration is of course perfectly valid.
I copied it straight out of the manpage so I'd hope so :>
Quoted 4 lines
Give me a day or so to check all this out. I don't think looking at the X behavior is too useful: too many place that the direction can be swapped. Instead, look which way the bits coming directly out of evdev point.
I can do that (early next week), but I don't have any other devices to test with. Can provide a dump.
Quoted 8 lines
Quoted 6 lines
IIRC I set things
up so that positive X was the same as on other evdev devices. Is the supplied X config swapping the X axis with this line?Quoted 1 line
Quoted 1 line
Option "evBits" "+1-2"
No idea! I just copied it out of the manpage from evdev(4)
As the xf86-input-evdev maintainer, I can tell you quite firmly that the answer is a solid no.
However I can also tell you that I may infact have the behavior backwards in the driver. :)
Yell, scream, and shout if that's the case.
Zephaniah E. Hull.
Signature · 6 lines
1024D/E65A7801 Zephaniah E. Hull <[email protected]> 92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801 CCs of replies from mailing lists are requested. If I have trouble installing Linux, something is wrong. Very wrong. -- Linus Torvalds on l-k.
As far as I can tell you have it right, all the way up the stack for me. There's so many places it can get flipped, though, that it's hard to tell.
Bart
Quoted 63 lines · In message <[email protected]> you wrote:
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inlineQuoted 15 lines · Johannes Berg
Quoted 2 lines · Barton C Massey
Quoted 2 lines
I unfortunately don't have the hardware in question to test with. This X configuration is of course perfectly valid.
I copied it straight out of the manpage so I'd hope so :>
Quoted 4 lines
Give me a day or so to check all this out. I don't think looking at the X behavior is too useful: too many place that the direction can be swapped. Instead, look which way the bits coming directly out of evdev point.
I can do that (early next week), but I don't have any other devices to test with. Can provide a dump.
Quoted 8 lines
Quoted 6 lines
IIRC I set things
up so that positive X was the same as on other evdev devices. Is the supplied X config swapping the X axis with this line?Quoted 1 line
Quoted 1 line
Option "evBits" "+1-2"
No idea! I just copied it out of the manpage from evdev(4)
As the xf86-input-evdev maintainer, I can tell you quite firmly that the answer is a solid no.
However I can also tell you that I may infact have the behavior backwards in the driver. :)
Yell, scream, and shout if that's the case.
Zephaniah E. Hull.
Signature · 21 lines
1024D/E65A7801 Zephaniah E. Hull <[email protected]> 92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801 CCs of replies from mailing lists are requested. If I have trouble installing Linux, something is wrong. Very wrong. -- Linus Torvalds on l-k. --bajzpZikUji1w+G9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGL7TaRFMAi+ZaeAERAvrAAJ9SbwKUwtHslgyE2aUESD1diHt4yQCg3p1i XqAtCSNKgyqhk2OzuppMbOQ= =F7/i -----END PGP SIGNATURE----- --bajzpZikUji1w+G9--
Alright, note that at the moment there is no way to invert it except with xmodmap. (Since they get mapped as buttons, you can swap them there in a trivial fashion. If you're already swapping because you're left handed, it's even easier.)
At the moment, we map positive hwheel to 6, and negative to 7.
We also map positive wheel to 4, and negative to 5, so that fits.
Once xf86-input-evdev is rewritten for the xserver input-hotplug, it will be a complete config file rewrite, but it will allow lots of really funky mapping that currently isn't supported.
(It's 1.2.x, first with the old author was 1.0.x, 1.1.x broke everything but worked so much better it wasn't funny. 1.2.x with the right server hotplug code (which I'll write if I have to, urgh) should be a similar improvement.)
Zephaniah E. Hull.
Quoted 71 lines · Barton C Massey
As far as I can tell you have it right, all the way up the stack for me. There's so many places it can get flipped, though, that it's hard to tell.
Bart
Quoted 63 lines · In message <[email protected]> you wrote:
--bajzpZikUji1w+G9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inlineQuoted 15 lines · Johannes Berg
Quoted 2 lines · Barton C Massey
Quoted 2 lines
I unfortunately don't have the hardware in question to test with. This X configuration is of course perfectly valid.
I copied it straight out of the manpage so I'd hope so :>
Quoted 4 lines
Give me a day or so to check all this out. I don't think looking at the X behavior is too useful: too many place that the direction can be swapped. Instead, look which way the bits coming directly out of evdev point.
I can do that (early next week), but I don't have any other devices to test with. Can provide a dump.
Quoted 8 lines
Quoted 6 lines
IIRC I set things
up so that positive X was the same as on other evdev devices. Is the supplied X config swapping the X axis with this line?Quoted 1 line
Quoted 1 line
Option "evBits" "+1-2"
No idea! I just copied it out of the manpage from evdev(4)
As the xf86-input-evdev maintainer, I can tell you quite firmly that the answer is a solid no.
However I can also tell you that I may infact have the behavior backwards in the driver. :)
Yell, scream, and shout if that's the case.
Zephaniah E. Hull.
Signature · 21 lines
1024D/E65A7801 Zephaniah E. Hull <[email protected]> 92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801 CCs of replies from mailing lists are requested. If I have trouble installing Linux, something is wrong. Very wrong. -- Linus Torvalds on l-k. --bajzpZikUji1w+G9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGL7TaRFMAi+ZaeAERAvrAAJ9SbwKUwtHslgyE2aUESD1diHt4yQCg3p1i XqAtCSNKgyqhk2OzuppMbOQ= =F7/i -----END PGP SIGNATURE----- --bajzpZikUji1w+G9--
Signature · 12 lines
1024D/E65A7801 Zephaniah E. Hull <[email protected]> 92ED 94E4 B1E6 3624 226D 5727 4453 008B E65A 7801 CCs of replies from mailing lists are requested. }>No. I just point out to troublemakers that I have an English degree, }>which means that I am allowed to make changes to the English language. }>(What _else_ could it possibly be for?) }Wow; in that case, my physics degree is *WAY* more useful than I }had thought. This just proves how useless a computer science degree is: there is hardly any useful science involved at all. I want my computer black magic degree! -- Victoria Swann, Jonathan Dursi, and D. Joseph Creighton on ASR
Quoted 4 lines · In message <[email protected]> you wrote:
Alright, note that at the moment there is no way to invert it except with xmodmap. (Since they get mapped as buttons, you can swap them there in a trivial fashion. If you're already swapping because you're left handed, it's even easier.)
The six places that an axis can be flipped are:
1. By the input driver
2. By the evdev code
3. By the X evdev driver
4. By the xmodmap event mapping
5. By the toolkit
6. By the application itself
I've seen all but 3 and 5 in various situations in practice.
Five is particularly troublesome, since it's on a per-app basis, leading to inconsistent bug reports. Encourage people to use GIMP when testing, rather than Firefox/Iceweasel, as the GIMP seems to consistently get it right and isn't really subject to toolkit troubles.
Somebody probably needs to write a bunch of code that will look at layers 2-4 and provide a definitive report of what's going on. In my copious spare time...
Bart Massey
Assoc. Prof. Computer Science
Portland State University
[email protected]