Gestures to pan screen with arrows#19478
Conversation
|
I implemented NVDA+alt+arrows gestures for step by step panning, the values can be changed, there is a min/max/step variables that can be modified. I choosed to force the mouse to stay in the middle of the magnifier window so if someone decides to move it, there won't be a sudden jump of the window. I'm open to any modifications |
There was a problem hiding this comment.
Pull request overview
This PR adds keyboard gestures for panning the magnifier screen, allowing users who don't use a mouse to navigate the magnified view. The implementation includes customizable pan values and edge detection for boundary awareness.
Changes:
- Added 8 new keyboard gestures (4 directional pans + 4 edge pans) with NVDA+Alt+Arrow combinations
- Introduced configurable pan value setting with range from 10-100 pixels
- Implemented pan margin calculation and boundary detection logic
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| source/config/configSpec.py | Adds defaultPanValue configuration option with min/max constraints |
| source/_magnifier/config.py | Implements PanValue class with pan_range and pan_strings methods, plus getter/setter functions |
| source/_magnifier/magnifier.py | Adds _panValue field, setPanMarginBorder method, and _pan method for panning logic |
| source/_magnifier/utils/types.py | Defines 8 new MagnifierAction enum values for pan operations |
| source/_magnifier/commands.py | Implements 8 command functions for panning operations with user feedback |
| source/globalCommands.py | Registers 8 script handlers with keyboard gesture bindings |
| source/gui/settingsDialogs.py | Adds pan value dropdown to magnifier settings panel |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Please fill out the PR description in full and address CoPilot's review |
|
Do these really need four default gestures? |
IMO yes. These commands are mandatory for any Magnifier user who does not use the mouse. IMO these gestures are much more useful than than gestures to toggle focus tracking mode or to cycle through filters. What would you suggest instead? Leave them unassigned, or something else? |
seanbudd
left a comment
There was a problem hiding this comment.
Thanks @Boumtchack - this is just a partial review. Would also like @CyrilleB79's thoughts around panning grain
|
I have done some tests on this PR.
|
I have tried getting this problem but it works fine for me, have you some settings that are not default that could be the reason of this issue?
If I understand correctly, it we would change the pan steps value by a % step value so it feels the same for the user regardless of the zoom level?
I guess there is a default bip sound for the good execution of a command? also I've tried to hold the command to pan at 1px and it sounds awfull, I don't know if having a bip would be better, but maybe no one will just hold down the panning command. I would still keep the arrived to edge ones
yes I don't mind that |
I do not think so: I have tested with a brand new NVDA config with only few changes.
Yes, exact.
Do you mean in NVDA in general? (the answer is no) Or just about panning commands? (I cannot hear them; can you point in the code where it is located). Maybe we should first wait this PR to be merged and have people experimenting with it before we decide what the most desirable audio feedback upon panning commands would be.
Yes, when I set step to 1px and hold panning keys pressed, I just hear the beginning of the word "Panning" repeated again and again, what is not very desirable. With windows Magnifier + Windows Magnifier add-on, I sometimes hold panning keys (control+alt+arrows) to go faster. So with Windows Magnifier, it was clearly a real use case. I have configured Windows Magnifier feedback to beep on panning commands. It gives useful information. But I agree that:
Alternatively, one can imagine the Zoomtext panning command approach which is much nicer from UX point of view.
That's an example and steps 2 and 3 can be omitted, or can also be repeated to increase or decrease the panning speed. Though, such key commands may not fit well easily with NVDA input gestures system. So if possible, this may be thought and discussed in a separate subsequent issue and PR.
Do you mean that you would keep the spoken message? |
|
I think the audio issue could be discussed more thoroughly in an other PR with a proper issue. I came accross an other problem, in my opinion is that if we deal with percents, panning top and right won't have the same value as screens are not squares, so it might feel a little weird. For the message I changed it to "at top edge" as suggested by Sean |
…zoomPanningGesture
|
Thanks @Boumtchack - I think this is almost readt |
|
Please make sure to resolve merge conflicts from #19593 |
|
Now we can pan with true center activated properly. |
|
Is this PR ready? If yes, can you switch its state to ready (not Draft anymore)? Thanks |
|
yes I was just cheking for any unwanted bugs due to merge |
|
A very useful addition! Many thanks for having this finally merged! |
Link to issue number:
Fixes #19471
Summary of the issue:
Users who doesn't use mouse were needing a way to move the screen
Description of user facing changes:
8 new gestures to learn for panning magnifier window
Description of developer facing changes:
N/A
Description of development approach:
Adding 8 new gestures:
Testing strategy:
Known issues with pull request:
Code Review Checklist: