Skip to content

Magnifier implementation#19228

Merged
seanbudd merged 100 commits intonvaccess:masterfrom
France-Travail:NvdaMagnifierImplementation
Jan 19, 2026
Merged

Magnifier implementation#19228
seanbudd merged 100 commits intonvaccess:masterfrom
France-Travail:NvdaMagnifierImplementation

Conversation

@Boumtchack
Copy link
Copy Markdown
Contributor

@Boumtchack Boumtchack commented Nov 17, 2025

Link to issue number:

Closes #12539

Summary of the issue:

This pull request introduces a new NVDA magnifier feature, including docked and lens magnifier modes, color filter support, and a set of global commands for controlling magnification. The changes add new classes for handling magnifier windows, provide optimized color filtering, and implement keyboard shortcuts for toggling magnification, zooming, cycling modes, and color filters.

Description of user facing changes:

Implemented new script commands in globalCommands.py for starting/stopping the magnifier, zooming in/out, cycling color filters, toggling fullscreen mode, cycling magnifier types, and spotlighting the magnifier window, each with descriptive messages and gestures.

Description of developer facing changes:

No significant changes.
A new displayChanged extension point under winAPI._displayTracking, which notifies handlers of display configuration changes.

Description of development approach:

  • Introduced the main magnifier module with initialization, activation, and shutdown logic in __init__.py, supporting only full-screen magnification for now.
  • Added a FullScreenMagnifier class implementing full-screen magnification, handling zoom, color filters, mouse centering, and spotlight mode, interfacing with the Windows Magnification API.
  • Implemented keyboard command handlers for toggling the magnifier, zooming, cycling color filters, changing full-screen modes, and starting spotlight mode in commands.py.
  • Added a configuration module (config.py) to manage default zoom level, color filter, full-screen mode, and mouse centering settings, with utilities for retrieving and setting these values.

Testing strategy:

unit test

manual testing of all the new features

Known issues with pull request:

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@Boumtchack Boumtchack mentioned this pull request Nov 17, 2025
8 tasks
@seanbudd seanbudd changed the title Nvda magnifier implementation Magnifier implementation Nov 18, 2025
@Boumtchack Boumtchack force-pushed the NvdaMagnifierImplementation branch from f5a86b5 to 7b3ee4f Compare November 24, 2025 10:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 23 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/_magnifier/commands.py
Comment thread source/_magnifier/commands.py
Comment thread source/gui/settingsDialogs.py Outdated
Comment thread source/_magnifier/config.py Outdated
Comment thread source/_magnifier/config.py Outdated
Comment thread tests/unit/test_magnifier/test_spotlightManager.py Outdated
@hwf1324
Copy link
Copy Markdown
Contributor

hwf1324 commented Jan 16, 2026

Does mouse tracking and visual highlight work with this software? particularly at different DPI scaling?

I think this is unrelated; the reason might be that the candidate window is not reporting the correct position information or something similar. When the candidate window appears, the visual highlighter draws a focus rectangle the size of the current window, and the NVDA magnifier centers on this rectangle instead of following the input cursor.

seanbudd and others added 5 commits January 16, 2026 15:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread tests/unit/test_magnifier/test_spotlightManager.py Outdated
Comment thread tests/unit/test_magnifier/test_spotlightManager.py Outdated
Comment thread tests/unit/test_magnifier/test_spotlightManager.py Outdated
Comment thread tests/unit/test_magnifier/test_spotlightManager.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread source/gui/settingsDialogs.py Outdated
@seanbudd
Copy link
Copy Markdown
Member

@hwf1324 can you open a new issue for that?

@hwf1324
Copy link
Copy Markdown
Contributor

hwf1324 commented Jan 16, 2026

can you open a new issue for that?

No problem, but I think this should be done after this PR is merged.

@seanbudd seanbudd requested a review from Qchristensen January 19, 2026 00:35
Copy link
Copy Markdown
Member

@Qchristensen Qchristensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good, I would like to see a filter keystroke by default though

Comment thread user_docs/en/userGuide.md
|Toggles the magnifier on and off |`NVDA+shift+w` |Enables or disables the magnifier|
|Increases the magnification level of the magnifier |`NVDA+shift+equals` |Increases the zoom level|
|Decreases the magnification level of the magnifier |`NVDA+shift+minus` |Decreases the zoom level|
|Toggle filter of the magnifier | None |Cycles through available color filters (normal, grayscale, inverted)|
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything reads fine, though I do think we should have a filter keystroke by default - it is a common feature of magnification software, but you also often encounter situations where you need to toggle the filter (eg to see a photo in its natural colours).

Perhaps NVDA+shift+i

Even though it's called "filter" rather than "invert", NVDA+shift+f is already used, and also 'i' is a little consistent with Windows magnifier which uses control+alt+i for the same function.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Boumtchack - can you do this in a separate PR? I think nvda+shift+i is fine

@seanbudd seanbudd merged commit 319404c into nvaccess:master Jan 19, 2026
39 checks passed
@github-actions github-actions Bot added this to the 2026.2 milestone Jan 19, 2026
@CyrilleB79
Copy link
Copy Markdown
Contributor

Congratulations @Boumtchack for this big work being merged! This is very appreciated. And this lays the foundations for many future related developments and improvements. Again, a big thank you to you!

seanbudd added a commit that referenced this pull request Feb 6, 2026
…ilters (#19464)

Follow up to #19228
Summary of the issue:

Gestures weren't bound for changing filters
Description of user facing changes:

Adds NVDA+shift+i for changing filters
Description of developer facing changes:

N/a
Description of development approach:

    fixed up gesture capitalisation
    added gestures
tareh7z pushed a commit to tareh7z/nvda that referenced this pull request Feb 16, 2026
Closes nvaccess#12539
Summary of the issue:

This pull request introduces a new NVDA magnifier feature, including docked and lens magnifier modes, color filter support, and a set of global commands for controlling magnification. The changes add new classes for handling magnifier windows, provide optimized color filtering, and implement keyboard shortcuts for toggling magnification, zooming, cycling modes, and color filters.
Description of user facing changes:

Implemented new script commands in globalCommands.py for starting/stopping the magnifier, zooming in/out, cycling color filters, toggling fullscreen mode, cycling magnifier types, and spotlighting the magnifier window, each with descriptive messages and gestures.
Description of developer facing changes:

No significant changes.
A new displayChanged extension point under winAPI._displayTracking, which notifies handlers of display configuration changes.
Description of development approach:

    Introduced the main magnifier module with initialization, activation, and shutdown logic in __init__.py, supporting only full-screen magnification for now.
    Added a FullScreenMagnifier class implementing full-screen magnification, handling zoom, color filters, mouse centering, and spotlight mode, interfacing with the Windows Magnification API.
    Implemented keyboard command handlers for toggling the magnifier, zooming, cycling color filters, changing full-screen modes, and starting spotlight mode in commands.py.
    Added a configuration module (config.py) to manage default zoom level, color filter, full-screen mode, and mouse centering settings, with utilities for retrieving and setting these values.
tareh7z pushed a commit to tareh7z/nvda that referenced this pull request Feb 16, 2026
…ilters (nvaccess#19464)

Follow up to nvaccess#19228
Summary of the issue:

Gestures weren't bound for changing filters
Description of user facing changes:

Adds NVDA+shift+i for changing filters
Description of developer facing changes:

N/a
Description of development approach:

    fixed up gesture capitalisation
    added gestures
@Boumtchack Boumtchack deleted the NvdaMagnifierImplementation branch April 21, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. merge-early Merge Early in a developer cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Windows Magnifier to follow NVDA virtual cursor

7 participants