Bug 313067 - On X11, switching to left-handed mode should also change XInput button mapping
Summary: On X11, switching to left-handed mode should also change XInput button mapping
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_mouse (show other bugs)
Version: 5.15.4
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-11 10:55 UTC by h.goebel
Modified: 2024-03-25 01:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description h.goebel 2013-01-11 10:55:47 UTC
When switching the mouse to left-handed mode (using systemsettings), only Core-Events are changed, not XInput events.

a) This is yields to problems with programs using XInput, e.g. for supporting different input devices. See below for a example program.
b) Solving this issue would be a step towards solving bug 244736 - "Changing mouse buttons order from Systemsetting modifies all input devices settings", as XInput settings can be set for each device.

Expected behavior
==================

Instead of modifying core-event settings, KDE should modify XInput settings. (Until the settings GUI supports selecting the device, as an intermediate solution, XInput settings could be set for all mouse devices.)

Reproducible: Always

Steps to Reproduce:
Steps to Reproduce
==================

1) Preparation: Get the XInput-ID of your mouse

$ xinput list | grep -i pointer
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ HID 046a:0023                             id=9    [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft USB Wireless Mouse    id=10   [slave  pointer  (2)]

---> spot the id, in this case it is 10

2) Make sure KDE mouse settings is set to right-handed mode (which is the default)
3) Verify expected behavior
3.1) Physically left button is button 1, Physically right button is button 3
   xev | grep -A3 Button
3.2) check xinput button mappings
$ xinput get-button-map 10
1 2 3 4 5 6 7 8 9 10 11 12 13

--> buttons are not switched (as expected)

4) Switch KDE mouse settings to left-handed mode.
5) Check behavior
5.1) Physically right button is button 1, physically left button is button 3 (as expected)
   xev | grep -A3 Button
5.2) check xinput button mappings
$ xinput get-button-map 10
1 2 3 4 5 6 7 8 9 10 11 12 13

--> buttons are still not switched (in XInput)

For proofing, this is a problem, use xournal <http://xournal.sourceforge.net/>.
6) Still in left-handed mode, start xournal
7) Ensure "Options -> Use XInput" (in xournal) is enabled (which is the default)
8) Click on some icons in the toolbar using button 1 (physically right) -> works
9) Try to draw some line in the main area of the window using button 1 (physically right) -> does not work
10) Try to draw some line in the main area of the window using button 3 (physically left) -> works, but is wrong button
11) Now disable "Options -> Use XInput"
11.1) Toolbar elements are still working when clicked by button 1 (physically right) (as expected)
11.2) Drawing is now possible using using button 1 (physically right)

This shows, the misbehavior in xournal is reasoning in KDE not changing XInput but core events.
Comment 1 Justin Zobel 2021-03-09 07:29:40 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 2 h.goebel 2021-03-09 14:34:32 UTC
Yes, this bug still persists in 5.15.4.