Bug 52871

Summary: Improve support for HID - AC Pan (mouse horizontal wheel)
Product: Drivers Reporter: Marcel Dopita (mdop)
Component: Input DevicesAssignee: drivers_input-devices
Status: NEW ---    
Severity: enhancement    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.6.11 Subsystem:
Regression: No Bisected commit-id:
Attachments: Report descriptor - Linux
Report descriptor - Windows

Description Marcel Dopita 2013-01-20 21:54:49 UTC
Created attachment 91541 [details]
Report descriptor - Linux

On linux generated button events don't provide enough information to know when horizontal wheel button was released (not in kernel and therefore not even in evdev).

I have mouse Logitech Performance MX which has single wheel (vertical scroll and middle click) but it can also be tilted to the right/left. I remapped left and right tilt to key combinations (Control+PageUp/PageDown).
This works fine in Windows but in linux if the press/tilt is longer than 50 ms, more presses and releases are generated by evdev (and my combination in xbindkeys is executed several times).

I found out that HID reports of that events are different between Windows and linux. 

Linux: < 50 ms tilt to left
20 01 02 00 00 00 00 00 00 ff 00 00 00 00 00

Linux: > 50 ms tilt to left
20 01 02 00 00 00 00 00 00 ff 00 00 00 00 00
20 01 02 00 00 00 00 00 00 ff 00 00 00 00 00
20 01 02 00 00 00 00 00 00 ff 00 00 00 00 00
...
20 01 02 00 00 00 00 00 00 ff 00 00 00 00 00
20 01 02 00 00 00 00 00 00 ff 00 00 00 00 00


Windows: < 50 ms tilt to left
20 01 02 40 00 00 00 00 00 F8 00 00 00 00 00
20 01 02 00 00 00 00 00 00 00 00 00 00 00 00

Windows: > 50 ms tilt to left
20 01 02 40 00 00 00 00 00 F4 00 00 00 00 00
20 01 02 40 00 00 00 00 00 E8 00 00 00 00 00
20 01 02 40 00 00 00 00 00 DC 00 00 00 00 00
...
20 01 02 40 00 00 00 00 00 F0 00 00 00 00 00
20 01 02 00 00 00 00 00 00 00 00 00 00 00 00


Related issue in xorg: https://bugs.freedesktop.org/show_bug.cgi?id=32533

Please let me know if there's any more information you would like to know or code to test.
Comment 1 Marcel Dopita 2013-01-20 21:55:18 UTC
Created attachment 91551 [details]
Report descriptor - Windows