Fix some mouse gestures#18906
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes broken mouse gestures by correcting the dwExtraInfo parameter in executeMouseEvent to use 0 instead of None. This change addresses compatibility issues introduced in #18883 where the parameter was correctly declared as ULONG_PTR, which cannot accept None values.
- Fixed the
dwExtraInfoparameter type issue inwinUser.mouse_eventcall - Updated function signatures to use modern Python type hints
- Improved documentation formatting and clarity
Comments suppressed due to low confidence (3)
source/mouseHandler.py:1
- The
Optionalimport is removed but the file still usesOptional[float]type hints on lines 336, 344, and 357. This will cause import errors. Either keep the import or update all type hints to use the modernfloat | Nonesyntax consistently.
# A part of NonVisual Desktop Access (NVDA)
source/mouseHandler.py:350
- Incorrect docstring parameter syntax. Should be
@param(without space) instead of@ paramto follow proper docstring formatting.
@ param releaseDelay: optional float in seconds of how long NVDA should sleep
source/mouseHandler.py:363
- Incorrect docstring parameter syntax. Should be
@param(without space) instead of@ paramto follow proper docstring formatting.
@ param releaseDelay: optional float in seconds of how long NVDA should sleep
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
seanbudd
approved these changes
Sep 12, 2025
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:
Follow-up to #18883
Fixes #18913
Summary of the issue:
Some gestures that control the mouse are broken. These include left/right mouse button lock/unlock, and navigator object default action.
Description of user facing changes:
They work again.
Description of developer facing changes:
None.
Description of development approach:
Updated
mouseHandler.executeMouseEventto send0instead ofNoneas the value ofdwExtraInfo. This is necessary asdwExtraInfois correctly declared asULONG_PTRsince #18883, so ctypes will not acceptNone.Testing strategy:
Ran from source and tested clicking and locking/unlocking the left and right mouse buttons, as well as activating the navigator object.
Known issues with pull request:
None
Code Review Checklist: