Skip to content

Commit

Permalink
Use UIA caret events in Windows Terminal (nvaccess#16873)
Browse files Browse the repository at this point in the history
Follow-up of nvaccess#16711, nvaccess#16817.

Summary of the issue:
UIA caret events in Windows Terminal were unreliable before nvaccess#16711. In particular, when rapidly pressing backspace, sometimes the last character of the prompt would be erroneously read.

Description of how this pull request fixes the issue:
Re-enable caret events in Windows Terminal specifically. Note that caret events are still broken in this way in Conhost and are therefore left disabled.
  • Loading branch information
codeofdusk authored Jul 18, 2024
1 parent 6380dcc commit 067c8a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions source/NVDAObjects/UIA/winConsoleUIA.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ def event_UIA_notification(self, **kwargs):
"Block notification events when diffing to prevent double reporting."
log.debugWarning(f"Notification event blocked to avoid double-report: {kwargs}")

def _get_caretMovementDetectionUsesEvents(self) -> bool:
"Windows Terminal has a good implementation of caret move detection."
return True


class _NotificationsBasedWinTerminalUIA(UIA):
"""
Expand Down
6 changes: 3 additions & 3 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

### Bug Fixes

* NVDA once again relies on UIA events for caret movement in XAML and WPF text controls, rather than only on manual querying of the caret position. (#16817, @LeonarddeR)
* The Seika Notetaker driver now correctly generates braille input for space, backspace and dots with space/backspace gestures. (#16642, @school510587)
* In on-demand speech mode, NVDA does not talk anymore when a message is opened in Outlook, when a new page is loaded in a browser or during the slideshow in PowerPoint. (#16825, @CyrilleB79)
* NVDA once again relies on events for caret movement in several cases, rather than only on manual querying of the caret position.
* UIA for XAML and WPF text controls. (#16817, @LeonarddeR)
* IAccessible2 for browsers such as Firefox and Chromium based browsers. (#11545, #16815, @LeonarddeR)
* UIA in Windows Terminal. (#16873, @codeofdusk)
* The Seika Notetaker driver now correctly generates braille input for space, backspace and dots with space/backspace gestures. (#16642, @school510587)
* In on-demand speech mode, NVDA does not talk anymore when a message is opened in Outlook, when a new page is loaded in a browser or during the slideshow in PowerPoint. (#16825, @CyrilleB79)


### Changes for Developers
Expand Down

0 comments on commit 067c8a9

Please sign in to comment.