-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Honor Windows setting to swap primary mouse button #12922
Conversation
… honor the Windows user setting for swapping the left and right mouse buttons, making the primary button right rather than left.
b627a5b
to
b1c6195
Compare
Would it also be worth adding an item in the change for developers in the change log? |
…/ set the caret position.
b1c6195
to
492bba3
Compare
This pr has been split such that we can drop off the last 7 comits if we don't want to test all the scenarios other than Firefox / Chrome (which has been verified fixed). |
We are going to merge this now, very early in the 2022.1 dev cycle, to ensure it gets wide user testing in alphas, as we want to identify any app that for some reason does not honor the Windows primary mouse button setting. |
Link to issue number:
Fixes #12642
Summary of the issue:
NVDA may at times resort to clicking the mouse to perform particular actions on behalf of the user, such as activating a link or bringing up a context menu.
Currently, NVDA clicks the left mouse button to activate / select items, and clicks the right mouse button to display a context menu. This is generally expected behaviour.
However, Windows has a user setting allowing the user to swap the mouse buttons, such that the primary button (activating / selecting) is the right mouse button, and the secondary (context menu) is the left.
If the user has chosen to swap the buttons, NVDA may inadvertantly display a context menu when trying to activate an item, or the other way round.
Description of how this pull request fixes the issue:
This pr adds doPrimaryClick and doSecondaryClick functions to mouseHandler that honor the Windows user preference for which button is the primary mouse button.
All code in NVDA that licks aa mouse button in order to perform activation, selection or show a context menu has been changed to call these new functions in place of calling executeMouseEvent for the left or right mouse button.
However, The mouse click scripts in globalCommands have not been changed, as these are specifically named after which physical mouse button they click, rather than performing a logical primary or secondary action.
Testing strategy:
this certainly requires a lot of testing, especially because we don't know if each of the affected apps actually do honor the Windows user preference themselves. I would think it is very highly likely though as the setting has existed as far back as Windows 95.
App scenarios that need testing:
data:text/html,<a href="http://www.google.com/"><h1>Test</h1></a>
Known issues with pull request:
There are a great deal of things to test for this pr, much of which is old or esoteric. At a mimimum this should be held back until 2022.1. But we also may consider only taking the specific scendarios we can verify and that were reported in issue #12642
Change log entries:
New features
Changes
Bug fixes
Changes for developers
Code Review Checklist: