Skip to main content

Overview

Braille display drivers enable NVDA to communicate with braille displays, allowing blind users to read screen content in braille. Each driver handles the specific protocol and hardware interface for a particular manufacturer’s displays.

Driver Architecture

Base Class

All braille drivers inherit from braille.BrailleDisplayDriver. This provides the core framework for:
  • Device detection and connection
  • Braille cell rendering
  • Input handling (keys, routing buttons, wheels)
  • Configuration management

Key Components

  1. Device Communication: Uses hwIo module for hardware I/O operations
  2. Protocol Implementation: Packet-based communication with displays
  3. Input Mapping: Translates hardware inputs to NVDA gestures
  4. Cell Translation: Converts Unicode braille to device-specific formats

Creating a Basic Driver

Minimal Driver Structure

Here’s the simplest possible braille driver:
brailleDisplayDrivers/noBraille.py

Required Attributes

str
required
Unique identifier for the driver (should match the module filename)
str
required
Human-readable name shown in NVDA’s braille display settings
bool
default:"False"
Whether the driver can be used safely from background threads
bool
default:"False"
Whether the driver supports automatic USB/Bluetooth detection

Full Driver Implementation

Freedom Scientific Example

The Freedom Scientific driver demonstrates a complete implementation:

Device Initialization

Protocol Implementation

Packet Structure

Most braille displays use packet-based protocols:

Writing to Display

Cell Translation

Some displays use non-standard dot mappings:

Input Handling

Key Gestures

Gesture Mapping

Automatic Detection

USB Detection

Advanced Features

Status Cells

Some displays have dedicated status cells:

Configuration Settings

Testing Your Driver

Debug Logging

Manual Testing

1

Install the driver

Place your driver file in source/brailleDisplayDrivers/yourdriver.py
2

Restart NVDA

Restart NVDA or reload plugins (NVDA+Control+F3)
3

Select your driver

Open NVDA Settings > Braille and select your driver from the list
4

Test functionality

  • Verify cell output displays correctly
  • Test all buttons and gestures
  • Check routing buttons work
  • Verify automatic detection (if supported)

Best Practices

Thread Safety

Mark isThreadSafe = True if your driver uses proper locking and can handle concurrent calls

Error Handling

Always handle connection errors gracefully and clean up resources in terminate()

Timeout Management

Use appropriate timeouts to prevent NVDA from freezing if the device becomes unresponsive

Translation Tables

Cache translation tables - don’t regenerate them for every cell update
Always test your driver with the actual hardware. Emulators may not accurately represent device behavior.

Common Issues

Device Not Detected

  • Verify USB/Bluetooth IDs are correct
  • Check device drivers are installed
  • Ensure registerAutomaticDetection() is implemented
  • Test with manual port selection first

Garbled Braille Output

  • Check if device uses non-standard dot mapping
  • Verify cell translation table is correct
  • Ensure byte order matches device expectations

Input Not Working

  • Verify packet parsing is correct
  • Check gesture IDs match NVDA’s expectations
  • Ensure InputGesture.source is set correctly
  • Test with NVDA input logging enabled

Reference

Key Modules

  • braille: Base braille display driver framework
  • hwIo: Hardware I/O for serial, USB, HID communication
  • bdDetect: Braille display automatic detection
  • inputCore: Input gesture handling
  • brailleInput: Braille keyboard input support

Example Drivers

Study these drivers in source/brailleDisplayDrivers/ for reference:
  • freedomScientific.py: Full-featured driver with complex protocol
  • alva.py: Driver with automatic detection
  • noBraille.py: Minimal driver structure
  • hidBrailleStandard.py: HID-based braille standard protocol

Developer Guide

See the NVDA Developer Guide for more information on plugin development