Skip to main content
NVDA’s event system allows plugins and NVDA Objects to respond to changes in the GUI, such as focus changes, value updates, and state changes. Events are abstracted from various accessibility APIs into a unified system.

How Events Work

When NVDA detects accessibility events from the operating system or applications, it:
  1. Receives the event from the underlying API (IAccessible, UIA, etc.)
  2. Abstracts the event into NVDA’s internal format
  3. Propagates the event through a chain of handlers
  4. Processes the event to update speech, braille, and UI

Event Propagation Chain

Events propagate through handlers in this order:
1

Global Plugins

All loaded global plugins receive the event first
2

App Module

The app module for the object’s application
3

Tree Interceptor

The tree interceptor (like browse mode) if applicable
4

NVDA Object

The NVDA Object itself that triggered the event

Event Method Signatures

On NVDA Objects

When defined directly on an NVDA Object:
Event on NVDA Object

On Plugins and App Modules

When defined on global plugins, app modules, or tree interceptors:
Event on plugin
Always call nextHandler() unless you specifically want to stop event propagation. Failing to do so can break NVDA’s normal event processing.

Common Events

Focus Events

Focus events

Property Change Events

Property change events

Text and Caret Events

Text and caret events

Window Events

Window events

Selection Events

Selection events

Document Events

Document events

Application Events

Application events

Real-World Examples

Example 1: Beep on Focus Changes

From the NVDA Developer Guide:
Notepad beeps

Example 2: Announce Button Presses

Announce button activation

Example 3: Monitor Value Changes

Monitor progress bars

Example 4: Track Focus Entering Dialogs

Dialog tracking

Example 5: Live Region Monitoring

Live region monitoring

Event Timing and Threading

Events are processed on NVDA’s main thread:
Event timing
Do not perform long-running operations in event handlers as this will freeze NVDA. Use background threads for expensive operations.

Stopping Event Propagation

Sometimes you want to stop an event from propagating further:
Stopping propagation
Stopping propagation prevents NVDA’s core event processing. Only do this if you’re replacing NVDA’s default behavior entirely.

Event Filtering

Filter events before processing:
Event filtering

Custom Events

You can fire custom events:
Custom events

Event Queuing

Events are queued to prevent flooding:
Event queuing

Debugging Events

Log events for debugging:
Event debugging
Enable debug logging in NVDA settings to see detailed event information: NVDA menu → Tools → Reload plugins

Performance Considerations

Event handlers should be fast:
Use properties with caching:
Throttle high-frequency events:

Best Practices

  1. Always call nextHandler() unless you’re intentionally stopping propagation
  2. Keep handlers fast - use background threads for expensive operations
  3. Filter early - check conditions before doing work
  4. Use appropriate event types - don’t handle all events when you need specific ones
  5. Log for debugging - use log.debug() to trace event flow
  6. Test thoroughly - events fire frequently, ensure your code is efficient

See Also

NVDA Objects

Learn about the objects that fire events

Scripts & Gestures

Handle user input with scripts

Writing Plugins

Create plugins that handle events

Architecture Overview

Understand the bigger picture