Skip to content

Add script to toggle mouse audio coordinates (#19026)#19282

Merged
seanbudd merged 7 commits into
nvaccess:masterfrom
rlawnsrl123:feature/mouse-audio-coords-toggle
Dec 5, 2025
Merged

Add script to toggle mouse audio coordinates (#19026)#19282
seanbudd merged 7 commits into
nvaccess:masterfrom
rlawnsrl123:feature/mouse-audio-coords-toggle

Conversation

@rlawnsrl123

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #19026

Summary of the issue:

This PR adds a new global script script_toggleMouseAudioCoordinates in globalCommands.py.

The script:

  • Appears in the Mouse category of the Input Gestures dialog.
  • Toggles the existing mouse/audioCoordinatesOnMouseMove configuration value using toggleBooleanValue.
  • Announces “Mouse audio coordinates on/off” when toggled.

No default gesture is assigned in code.
Users can bind any gesture they like from NVDA menu → Preferences → Input gestures… → Mouse.

Description of user facing changes:

Adds a new script in the Mouse category of the Input Gestures dialog that allows users to assign a gesture to toggle mouse audio coordinates (beeps that report mouse location).
There is no behavior change unless a user assigns a gesture.

Description of developer facing changes:

-Adds script_toggleMouseAudioCoordinates to GlobalCommands in globalCommands.py.

  • Uses the existing toggleBooleanValue helper to toggle config.conf["mouse"]["audioCoordinatesOnMouseMove"].
  • No changes to public APIs or configuration schema.

Description of development approach:

Reuse the existing toggleBooleanValue helper to avoid duplicating toggle logic and messages.
Only globalCommands.py is updated; no new settings or gesture defaults are added.

Testing strategy:

  • Ran NVDA from source using runnvda.bat.
  • Opened Preferences → Input gestures… → Mouse.
  • Confirmed that a new script “Toggles beeps that report mouse coordinates as the mouse moves” is present.
  • Assigned a temporary gesture (e.g. NVDA+Shift+M) and verified that:
    • The gesture toggles the “Play audio coordinates when mouse moves” option.
    • NVDA reports “Mouse audio coordinates on/off”.

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.

@hwf1324

hwf1324 commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

The user guide and change log should be updated simultaneously.

1 similar comment
@hwf1324

hwf1324 commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

The user guide and change log should be updated simultaneously.

@CyrilleB79

Copy link
Copy Markdown
Contributor

Nice.

What about playing a beep for the current mouse coordinates rather than issuing the speech message "enabled"? This would be more useful IMO and would allow to use a double-press to only hear the current position without permanently activating the feature.

@rlawnsrl123

Copy link
Copy Markdown
Contributor Author

@hwf1324 Thanks, I've updated both the user guide and the change log accordingly.

@hwf1324

hwf1324 commented Nov 26, 2025

Copy link
Copy Markdown
Contributor

Thanks, I've updated both the user guide and the change log accordingly.

@rlawnsrl123 , I've reviewed the T2T file. Is your base commit too far behind the upstream?

In the user guide, gestures should also be added to the table.

@rlawnsrl123

Copy link
Copy Markdown
Contributor Author

Thanks, great idea!

For this PR I’ll keep it as a simple toggle for the existing
“Play audio coordinates when mouse moves” setting (#19026),
and consider the double-press / one-shot beep in a separate follow-up PR.

@CyrilleB79

Copy link
Copy Markdown
Contributor

@rlawnsrl123 is this PR ready? If yes, you need to move it to "Ready" state so that it will be reviewed by NV Access.

@rlawnsrl123 rlawnsrl123 force-pushed the feature/mouse-audio-coords-toggle branch from 0322318 to 9b24678 Compare November 28, 2025 08:41
@rlawnsrl123

Copy link
Copy Markdown
Contributor Author

Thanks for the review!

I rebased this branch onto the latest master, updated userGuide.md and changes.md to document the new mouse audio coordinates toggle command (including an entry in the “Toggle which information NVDA reads” table), and removed the obsolete t2t files that had sneaked back into my branch.

@rlawnsrl123 rlawnsrl123 marked this pull request as ready for review November 28, 2025 08:45
@rlawnsrl123 rlawnsrl123 requested review from a team as code owners November 28, 2025 08:45
Comment thread user_docs/en/changes.md Outdated
Comment thread user_docs/en/userGuide.md Outdated
@seanbudd seanbudd added the conceptApproved Similar 'triaged' for issues, PR accepted in theory, implementation needs review. label Dec 4, 2025

@seanbudd seanbudd left a comment

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.

Nice work @rlawnsrl123

Comment thread source/globalCommands.py Outdated
Comment thread user_docs/en/changes.md

@Qchristensen Qchristensen left a comment

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.

Reads well

@seanbudd seanbudd merged commit b3fe579 into nvaccess:master Dec 5, 2025
1 check passed
@github-actions github-actions Bot added this to the 2026.1 milestone Dec 5, 2025
@wmhn1872265132 wmhn1872265132 mentioned this pull request Jan 23, 2026
5 tasks
seanbudd pushed a commit that referenced this pull request Jan 23, 2026
Follow-up to #19282
Summary of the issue:

#19282 Changes were incorrectly written into the 2025.3 version
Description of user facing changes:

None
Description of developer facing changes:

None
Description of development approach:

Update changes.md
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A keyboard shortcut to hear/stop mouse coordinates

6 participants