gesture.send() no longer disables numlock#17900
Merged
Merged
Conversation
5 tasks
Contributor
Author
|
@seanbudd I am targetting beta if you consider this an API-breaking change or if you also accept #17901 in beta. If you consider this PR to be an API-breaking change, I'll have to move the change log item in API breaking changes section. If you do not accept this PR in beta branch, I'll have to move the change log in 2025.2 section. |
seanbudd
reviewed
Apr 6, 2025
Contributor
Author
|
This PR is actually fixing an internal bug. But t bug is not visible by users, it's only visible by add-on developers:
So In which section should I put this change log item? |
seanbudd
pushed a commit
that referenced
this pull request
Apr 7, 2025
Follow-up of #17545 Blocked by #17900 Summary of the issue: #17545 has implemented the announcement resulting of the action to collapse or expand headings in Word with shift+alt+plus/- when using plus/minus on the main keyboard and on the numpad. Thought, using the numpad plus/minus key on the numpad does not report anything if numlock is enabled. Description of user facing changes alt+shift+numpadPlus/Minus will now report headings expanding / collapsing, no matter if numlock is on or off. Description of development approach Added the two gestures with numlock on in the gestures list of the script.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #10827
Blocking #17901
Summary of the issue:
In NVDA's code, when
numpadPlus,numpadMinus,numpadMultiplyandnumpadDivideis pressed, we make a difference if numlock is enabled or disabled, by artificially making numlock a modifier. Though, whennumlockmodifier is used in a gesture's key name andgesture.sendis used,numlockkey event is really sent to the system, causing numlock deactivation.Description of user facing changes
None
Description of development approach
In
KeyboardInputGesture.sendmethod, filternumlockas a modifier so that it is never sent to the system.Testing strategy:
gesture.senddoes not deactivate the numlock while testing Word collapse/expand headings: add gestures with numlock on #17901 with both Word collapse/expand headings: add gestures with numlock on #17901 and the current PR in the same branch.numlockused as main key is still sent:from keyboardHandler import KeyboardInputGesture;KeyboardInputGesture.fromName("numlock").send()Known issues with pull request:
Technically, it would change the behaviour of the
sendmethod. Is it considered an API-breaking change? I'd say not since it just fixes an undesirable and unexpected behaviour.Merging this change would cause a bug in Windows Magnifier add-on (3.7), in which a workaround of #10827 was already implemented. Though, being my own add-on, I'll take care of it.
Code Review Checklist:
@coderabbitai summary