brailleDisplayDrivers package

Subpackages

Submodules

brailleDisplayDrivers.alva module

class brailleDisplayDrivers.alva.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver, ScriptableObject

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'alva'

The name of the driver; must be the original module file name. @type: str

description = 'Optelec ALVA 6 series/protocol converter'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

timeout: float = 0.2

Maximum timeout to use for communication with a device (in seconds). This can be used for serial connections. Furthermore, it is used to stop waiting for missed acknowledgement packets.

supportedSettings: SupportedSettingType = (<autoSettingsUtils.driverSetting.BooleanDriverSetting object>,)

Typing for auto property L{_get_supportedSettings}

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

_get_model()
_updateSettings()
_dev: Serial | Hid
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_ser6SendMessage(cmd: bytes, value: bytes = b'') None
_ser6OnReceive(data: bytes)

Callback for L{self._dev} when it is L{hwIo.Serial}

_hidOnReceive(data: bytes)

Callback for L{self._dev} when it is L{hwIo.Hid}

_handleInput(group: int, number: int) None
_hidDisplay(cellBytes: bytes) None
_ser6Display(cellBytes: bytes) None
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

_handleTime(time: bytes)

@type time: bytes

_syncTime(dt: datetime)
_get_hidKeyboardInput()
_set_hidKeyboardInput(state)
scriptCategory = 'Braille'
script_toggleHidKeyboardInput(gesture)

Toggles HID keyboard simulation

__gestures = {'br(alva):t1+spEnter': 'toggleHidKeyboardInput'}
gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
property hidKeyboardInput
model
class brailleDisplayDrivers.alva.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'alva'
_abc_impl = <_abc._abc_data object>
identifiers: List[str] | Tuple[str, ...]
_propertyCache: Set[GetterMethodT]
_get_identifiers()

The identifier(s) which will be used in input gesture maps to represent this gesture. These identifiers will be normalized and looked up in order until a match is found. A single identifier should take the form: C{source:id} where C{source} is a few characters representing the source of this gesture and C{id} is the specific gesture. An example identifier is: C{kb(desktop):NVDA+1}

This property should not perform normalization itself. However, please note the following regarding normalization. If C{id} contains multiple chunks separated by a + sign, they are considered to be ordered arbitrarily and may be reordered when normalized. Normalization also ensures that the entire identifier is lower case. For example, NVDA+control+f1 and control+nvda+f1 will match when normalized. See L{normalizeGestureIdentifier} for more details.

Subclasses must implement this method. @return: One or more identifiers which uniquely identify this gesture. @rtype: list or tuple of str

brailleDisplayDrivers.baum module

class brailleDisplayDrivers.baum.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'baum'

The name of the driver; must be the original module file name. @type: str

description = 'Baum/HumanWare/APH/Orbit braille displays'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

_dev: IoBase
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_sendRequest(command: bytes, arg: bytes | bool | int = b'')
_onReceive(data: bytes)
_handleResponse(command: bytes, arg: bytes)
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.baum.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'baum'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.brailleNote module

Braille Display driver for the BrailleNote notetakers in terminal mode. USB, serial and bluetooth communications are supported. QWERTY keyboard input using basic terminal mode (no PC keyboard emulation) and scroll wheel are supported. See Brailliant B module for BrailleNote Touch support routines.

class brailleDisplayDrivers.brailleNote.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'brailleNote'

The name of the driver; must be the original module file name. @type: str

description = 'HumanWare BrailleNote'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_describe()
_onReceive(command: bytes)
_dispatch(command: int, arg: int, arg2: str | None = None)
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.brailleNote.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'brailleNote'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.brailliantB module

class brailleDisplayDrivers.brailliantB.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'brailliantB'

The name of the driver; must be the original module file name. @type: str

description = 'HumanWare Brailliant BI/B series / BrailleNote Touch'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

_dev: Serial | Hid
_initAttempt()
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_serSendMessage(msgId: bytes, payload: bytes | int | bool = b'')
_serOnReceive(data: bytes)
_serHandleResponse(msgId: bytes, payload: bytes)
_hidOnReceive(data: bytes)
_handleKeyRelease()
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.brailliantB.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'brailliantB'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.brltty module

class brailleDisplayDrivers.brltty.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

brltty braille display driver.

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'brltty'

The name of the driver; must be the original module file name. @type: str

description = 'brltty'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

brlapi_pipes: List[str] = []
classmethod _get_brlapi_pipes() List[str]

Get the BrlAPI named pipes

Every BRLTTY instance with the BrlAPI enabled will have it’s own named pipe to accept API connections. The brlapi.Connection constructor takes either a host:port argument or just :port. If only a port is given, this corresponds to the number at the end of the named pipe.

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_get_numCols() int
_get_numRows() int
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

_get_driverName()
_handleKeyPresses()
_onKeyPress(key)
gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
driverName
numCols: int

Number of columns (cells per row) of the braille display 0 indicates that braille should be disabled.

numRows: int

Number of rows of the braille display, this will be 1 for most displays Note: Setting this to 0 will cause numCells to be 0 and hence will disable braille.

class brailleDisplayDrivers.brltty.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'brltty'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.ecoBraille module

class brailleDisplayDrivers.ecoBraille.ecoTypes

Bases: object

TECO_NO_DISPLAY = 0
TECO_20 = 20
TECO_40 = 40
TECO_80 = 80
brailleDisplayDrivers.ecoBraille.eco_in_init(dev: Serial) int
brailleDisplayDrivers.ecoBraille.eco_in(dev: Serial) int
brailleDisplayDrivers.ecoBraille.eco_out(cells: List[int]) bytes
class brailleDisplayDrivers.ecoBraille.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

EcoBraille display driver.

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'ecoBraille'

The name of the driver; must be the original module file name. @type: str

description = 'EcoBraille displays'

A description of the driver. @type: str

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

classmethod getPossiblePorts()

Returns possible hardware ports for this driver. Optionally and in addition to the values from L{getManualPorts}, three special values may be returned if the driver supports them, “auto”, “usb”, and “bluetooth”.

Generally, drivers shouldn’t implement this method directly. Instead, they should provide automatic detection data via L{bdDetect} and implement L{getPossibleManualPorts} if they support manual ports such as serial ports.

@return: Ordered dictionary for each port a (key : value) of name : translated description.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_get_numCells()

Obtain the number of braille cells on this display. @note: 0 indicates that braille should be disabled. @note: For multi line displays, this is the total number of cells (e.g. numRows * numCols) @return: The number of cells.

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

_handleResponses()
_handleResponse(command: int)
gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
numCells: int

typing information for autoproperty _get_numCells

_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.ecoBraille.InputGestureKeys(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'ecoBraille'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.ecoBraille.InputGestureRouting(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'ecoBraille'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.freedomScientific module

Braille display driver for Freedom Scientific braille displays. A c(lang) reference implementation is available in brltty.

brailleDisplayDrivers.freedomScientific.MODELS = {'Focus 14': 14, 'Focus 40': 40, 'Focus 44': 44, 'Focus 70': 70, 'Focus 80': 80, 'Focus 84': 84, 'pm display 20': 20, 'pm display 40': 40}

Model names and number of cells

brailleDisplayDrivers.freedomScientific.FS_PKT_QUERY = b'\x00'

Query the display for information such as manufacturer, model and firmware version

brailleDisplayDrivers.freedomScientific.FS_PKT_ACK = b'\x01'

Response from the display that acknowledges a packet has been received

brailleDisplayDrivers.freedomScientific.FS_PKT_NAK = b'\x02'

Negative response from the display indicating a problem

brailleDisplayDrivers.freedomScientific.FS_PKT_KEY = b'\x03'

The display indicates that one ore more keys on the display are pressed/released. This includes normal buttons and the braille keyboard

brailleDisplayDrivers.freedomScientific.FS_PKT_BUTTON = b'\x04'

A routing button on the display is pressed/released

brailleDisplayDrivers.freedomScientific.FS_PKT_WHEEL = b'\x05'

Indicates a whiz wheel has turned. Please note that on newer models the wheels have been replaced by buttons, but there is no difference in the protocol.

brailleDisplayDrivers.freedomScientific.FS_PKT_HVADJ = b'\x08'

Set braille dot firmness. Not yet used in this driver.

brailleDisplayDrivers.freedomScientific.FS_PKT_BEEP = b'\t'

Lets the display beep. Not yet used in this driver.

brailleDisplayDrivers.freedomScientific.FS_PKT_CONFIG = b'\x0f'

Sends a configuration request to the display. Mainly used to enable extended key mode on newer displays to use all the buttons.

brailleDisplayDrivers.freedomScientific.FS_PKT_INFO = b'\x80'

Indicates a response to FS_PKT_QUERY from the display

brailleDisplayDrivers.freedomScientific.FS_PKT_WRITE = b'\x81'

Sends braille cells to the display.

brailleDisplayDrivers.freedomScientific.FS_PKT_EXT_KEY = b'\x82'

Indicates extended keys have been pressed. Newer displays use this for some of their keys, see also the list in KeyGesture.extendedKeyLabels

brailleDisplayDrivers.freedomScientific.FS_BYTE_NULL = b'\x00'

An empty packet argument or null byte

brailleDisplayDrivers.freedomScientific.FS_DATA_EMPTY = b''

Empty data in the packet payload

brailleDisplayDrivers.freedomScientific.FS_CFG_EXTKEY = b'\x02'

Send extended key events, to be used with the FS_PKT_CONFIG

brailleDisplayDrivers.freedomScientific.INFO_MANU_START = 0

Start position of manufacturer in FS_PKT_INFO payload

brailleDisplayDrivers.freedomScientific.INFO_MANU_END = 24

End position of manufacturer in FS_PKT_INFO payload

brailleDisplayDrivers.freedomScientific.INFO_MODEL_START = 24

Start position of model in FS_PKT_INFO payload

brailleDisplayDrivers.freedomScientific.INFO_MODEL_END = 40

End position of model in FS_PKT_INFO payload

brailleDisplayDrivers.freedomScientific.INFO_VERSION_START = 40

Start position of firmware version in FS_PKT_INFO payload

brailleDisplayDrivers.freedomScientific.INFO_VERSION_END = 48

End position of firmware version in FS_PKT_INFO payload

brailleDisplayDrivers.freedomScientific.DOTS_TABLE_SIZE = 8

The number of dots in a braille character/cell

brailleDisplayDrivers.freedomScientific.TRANSLATION_TABLE_SIZE = 256

THe size of a full braille translation table including all possible dot combinations

brailleDisplayDrivers.freedomScientific._makeTranslationTable(dotsTable)

Create a translation table for braille dot combinations

@param dotsTable: The list of 8 bitmasks to use for each dot (dot 1 - 8)

brailleDisplayDrivers.freedomScientific._translate(cells, translationTable)

Translate cells according to a translation table

The translation table contains the bytes to encode all the possible dot combinations. See L{_makeTranslationTable} as well.

@param cells: The cells to translate, given in ISO 11548 format (used by most braille displays) @type cells: [int] @param translationTable: A list of all possible braille dot combinations @type translationTable: [int]

brailleDisplayDrivers.freedomScientific.FOCUS_1_DOTS_TABLE = [1, 2, 4, 16, 32, 64, 8, 128]

Dots table used by first generation Focus displays

brailleDisplayDrivers.freedomScientific.FOCUS_1_TRANSLATION_TABLE = [0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23, 32, 33, 34, 35, 36, 37, 38, 39, 48, 49, 50, 51, 52, 53, 54, 55, 64, 65, 66, 67, 68, 69, 70, 71, 80, 81, 82, 83, 84, 85, 86, 87, 96, 97, 98, 99, 100, 101, 102, 103, 112, 113, 114, 115, 116, 117, 118, 119, 8, 9, 10, 11, 12, 13, 14, 15, 24, 25, 26, 27, 28, 29, 30, 31, 40, 41, 42, 43, 44, 45, 46, 47, 56, 57, 58, 59, 60, 61, 62, 63, 72, 73, 74, 75, 76, 77, 78, 79, 88, 89, 90, 91, 92, 93, 94, 95, 104, 105, 106, 107, 108, 109, 110, 111, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 144, 145, 146, 147, 148, 149, 150, 151, 160, 161, 162, 163, 164, 165, 166, 167, 176, 177, 178, 179, 180, 181, 182, 183, 192, 193, 194, 195, 196, 197, 198, 199, 208, 209, 210, 211, 212, 213, 214, 215, 224, 225, 226, 227, 228, 229, 230, 231, 240, 241, 242, 243, 244, 245, 246, 247, 136, 137, 138, 139, 140, 141, 142, 143, 152, 153, 154, 155, 156, 157, 158, 159, 168, 169, 170, 171, 172, 173, 174, 175, 184, 185, 186, 187, 188, 189, 190, 191, 200, 201, 202, 203, 204, 205, 206, 207, 216, 217, 218, 219, 220, 221, 222, 223, 232, 233, 234, 235, 236, 237, 238, 239, 248, 249, 250, 251, 252, 253, 254, 255]

Braille translation table used by first generation Focus displays

class brailleDisplayDrivers.freedomScientific.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver, ScriptableObject

Driver for Freedom Scientific braille displays

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'freedomScientific'

The name of the driver; must be the original module file name. @type: str

description = 'Freedom Scientific Focus/PAC Mate series'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

receivesAckPackets: bool = True

Whether displays for this driver return acknowledgements for sent packets. L{_handleAck} should be called when an ACK is received. Note that thread safety is required for the generic implementation to function properly. If a display is not thread safe, a driver should manually implement ACK processing.

timeout: float = 0.2

Maximum timeout to use for communication with a device (in seconds). This can be used for serial connections. Furthermore, it is used to stop waiting for missed acknowledgement packets.

wizWheelActions = [('display scroll', ('globalCommands', 'GlobalCommands', 'braille_scrollBack'), ('globalCommands', 'GlobalCommands', 'braille_scrollForward')), ('line scroll', ('globalCommands', 'GlobalCommands', 'braille_previousLine'), ('globalCommands', 'GlobalCommands', 'braille_nextLine'))]
classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_sendPacket(packetType: bytes, arg1: bytes = b'\x00', arg2: bytes = b'\x00', arg3: bytes = b'\x00', data: bytes = b'')

Send a packet to the display @param packetType: Type of packet (first byte), use one of the FS_PKT constants @param arg1: First argument (second byte of packet) @param arg2: Second argument (third byte of packet) @param arg3: Third argument (fourth byte of packet) @param data: Data to send if this is an extended packet, required checksum will

be added automatically

_onReceive(data: bytes)

Event handler when data from the display is received

Formats a packet of four bytes in a packet type and three arguments. If the packet is known to have a payload, this is also fetched and the checksum is verified. The constructed packet is handed off to L{_handlePacket}.

_handleReadError(error: int) bool
_handlePacket(packetType: bytes, arg1: bytes, arg2: bytes, arg3: bytes, payload: bytes)

Handle a packet from the device”

The following packet types are handled:

  • FS_PKT_ACK: See L{_handleAck}

  • FS_PKT_NAK: Logged and handled as an ACK

  • FS_PKT_INFO: Manufacturer, model and firmware version are extracted and set as

    properties on the object. Cell count is determined based on L{MODELS}. * arg1: length of payload * payload: manufacturer, model, firmware version in a fixed width field string

  • FS_PKT_WHEEL: The corresponding L{WheelGesture}s are sent for the wheel events.
    • arg1: movement direction (up/down) and number of clicks moved

      Bits: BBBAAA (least significant) * A: (bits 1-3) number of clicks the wheel has moved * B: (bits 4-6) which wheel (left/right) and what direction (up/down)

  • FS_PKT_BUTTON: the corresponding L{RoutingGesture} is sent
    • arg1: number of routing button

    • arg2: key press/release

    • arg3: if this is a button on the second row of routing buttons

  • FS_PKT_KEY: a key or button on the display is pressed/released (including the braille keyboard)
    • arg 1, 2, 3, 4:

      These bytes form the value indicating which of the 8 keys are pressed on the device. Key releases can be detected by comparing to the previous state, this work is done in L{_handleKeys}.

  • FS_PKT_EXT_KEY: ??
    • payload: The 4 most significant bits from a single byte are used.

      More investigation is required.

_handleAck()

Displays any queued cells after receiving an ACK

static _updateKeyBits(keyBits: int, oldKeyBits: int, keyCount: int)

Helper function that reports if keys have been pressed and which keys have been released based on old and new keybits.

_handleKeys(keyBits: int)

Send gestures if keys are released and update self._keyBits

_handleExtendedKeys(keyBits: int)

Send gestures if keys are released and update self._extendedKeyBits

static _calculateChecksum(data: bytes) int

Calculate the checksum for extended packets

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

_configureDisplay()

Enable extended keys on Focus firmware 3 and up

script_toggleLeftWizWheelAction(_gesture)
script_toggleRightWizWheelAction(_gesture)
__gestures = {'br(freedomScientific):leftWizWheelPress': 'toggleLeftWizWheelAction', 'br(freedomScientific):rightWizWheelPress': 'toggleRightWizWheelAction'}
gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.freedomScientific.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture

Base gesture for this braille display

source = 'freedomScientific'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.freedomScientific.KeyGesture(*args, **kwargs)

Bases: InputGesture, BrailleInputGesture

Handle keys and braille input for Freedom Scientific braille displays

keyLabels = ['dot1', 'dot2', 'dot3', 'dot4', 'dot5', 'dot6', 'dot7', 'dot8', 'leftWizWheelPress', 'rightWizWheelPress', 'leftShiftKey', 'rightShiftKey', 'leftAdvanceBar', 'rightAdvanceBar', None, 'brailleSpaceBar', 'leftGDFButton', 'rightGDFButton', None, None, 'leftBumperBarUp', 'leftBumperBarDown', 'rightBumperBarUp', 'rightBumperBarDown']
extendedKeyLabels = ['leftRockerBarUp', 'leftRockerBarDown', 'rightRockerBarUp', 'rightRockerBarDown']
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.freedomScientific.RoutingGesture(*args, **kwargs)

Bases: InputGesture

Gesture to handle cursor routing and second row of routing keys on older models

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.freedomScientific.WizWheelGesture(*args, **kwargs)

Bases: InputGesture

Gesture to handle wiz wheels movements

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.handyTech module

Braille display driver for Handy Tech braille displays.

class brailleDisplayDrivers.handyTech.InvisibleDriverWindow(*args, **kwargs)

Bases: CustomWindow

Constructor. @param windowName: The name of the window. @param windowStyle: The style of the window.

This is a combination of the C{winUser.WS_*} constants.

@param extendedWindowStyle: The extended style of the window.

This is a combination of the C{winUser.WS_EX_*} constants.

@param parent: The handle of the parent window, if any. @raise WindowsError: If an error occurs.

className: str = 'Handy_Tech_Server'
HT_SLEEP = 100
HT_INCREMENT = 1
HT_DECREMENT = 0
windowProc(hwnd: int, msg: int, wParam: int, lParam: int)

Process messages sent to this window. @param hwnd: The handle to this window. @type hwnd: int @param msg: The message. @type msg: int @param wParam: Additional message information. @type wParam: int @param lParam: Additional message information. @type lParam: int @return: The result of the message processing

or C{None} to call DefWindowProc.

@rtype: int or None

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.handyTech.Model(*args, **kwargs)

Bases: AutoPropertyObject

Extend from this base class to define model specific behavior.

deviceId = None

Device identifier, used in the protocol to identify the device @type: string

genericName = None

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = None

Specific name of this model @type: string

numCells = 0

Number of braille cells @type: int

postInit()

Executed after model initialisation.

Subclasses may extend this method to perform actions on initialization of the display. Don’t use __init__ for this, since the model ID has not been set, which is needed for sending packets to the display.

_get__display()

The L{BrailleDisplayDriver} which initialized this Model instance

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

display(cells: List[int])

Display cells on the braille display

This is the modern protocol, which uses an extended packet to send braille cells. Some displays use an older, simpler protocol. See OldProtocolMixin.

_abc_impl = <_abc._abc_data object>
_display
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.OldProtocolMixin

Bases: object

Mixin for displays using an older protocol to send braille cells and handle input

display(cells: List[int])

Write cells to the display according to the old protocol

This older protocol sends a simple packet starting with HT_PKT_BRAILLE, followed by the cells. No model ID or length are included.

class brailleDisplayDrivers.handyTech.AtcMixin

Bases: object

Support for displays with Active Tactile Control (ATC)

postInit()
class brailleDisplayDrivers.handyTech.TimeSyncFirmnessMixin

Bases: object

Functionality for displays that support time synchronization and dot firmness adjustments.

supportedSettings = (<autoSettingsUtils.driverSetting.NumericDriverSetting object>,)
postInit()
handleTime(timeBytes: bytes)
syncTime(dt: datetime)
class brailleDisplayDrivers.handyTech.TripleActionKeysMixin(*args, **kwargs)

Bases: AutoPropertyObject

Triple action keys

Most Handy Tech models have so called triple action keys. This keys are on the left and right side of the cells and can be pressed at the top, at the bottom and in the middle.

_get_keys()

Add the triple action keys to the keys property

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.JoystickMixin(*args, **kwargs)

Bases: AutoPropertyObject

Joystick

Some Handy Tech models have a joystick, which can be moved left, right, up, down or clicked on the center.

_get_keys()

Add the joystick keys to the keys property

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.StatusCellMixin(*args, **kwargs)

Bases: AutoPropertyObject

Status cells and routing keys

Some Handy Tech models have four status cells with corresponding routing keys.

_get_keys()

Add the status routing keys to the keys property

display(cells: List[int])

Display braille on the display with empty status cells

Some displays (e.g. Modular series) have 4 status cells. These cells need to be included in the braille data, but since NVDA doesn’t support status cells, we just send empty cells.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.ActiveSplitMixin

Bases: object

Mixin for displays supporting ActiveSplit, i.e. dynamic adjustment of number of cells

postInit()
class brailleDisplayDrivers.handyTech.ModularConnect88(*args, **kwargs)

Bases: TripleActionKeysMixin, Model

deviceId = b':'

Device identifier, used in the protocol to identify the device @type: string

genericName = 'Modular Connect'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Modular Connect 88'

Specific name of this model @type: string

numCells = 88

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.ModularEvolution(*args, **kwargs)

Bases: AtcMixin, TripleActionKeysMixin, Model

genericName = 'Modular Evolution'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_name()
_abc_impl = <_abc._abc_data object>
name

Specific name of this model @type: string

class brailleDisplayDrivers.handyTech.ModularEvolution88(*args, **kwargs)

Bases: ModularEvolution

deviceId = b'8'

Device identifier, used in the protocol to identify the device @type: string

numCells = 88

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.handyTech.ModularEvolution64(*args, **kwargs)

Bases: ModularEvolution

deviceId = b'6'

Device identifier, used in the protocol to identify the device @type: string

numCells = 64

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.handyTech.EasyBraille(*args, **kwargs)

Bases: OldProtocolMixin, Model

deviceId = b'D'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

genericName = 'Easy Braille'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Easy Braille'

Specific name of this model @type: string

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.handyTech.ActiveBraille(*args, **kwargs)

Bases: TimeSyncFirmnessMixin, AtcMixin, JoystickMixin, TripleActionKeysMixin, Model

deviceId = b'T'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

genericName = 'Active Braille'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Active Braille'

Specific name of this model @type: string

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.handyTech.ConnectBraille(*args, **kwargs)

Bases: TripleActionKeysMixin, Model

deviceId = b'U'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

genericName = 'Connect Braille'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Connect Braille'

Specific name of this model @type: string

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.Actilino(*args, **kwargs)

Bases: TimeSyncFirmnessMixin, AtcMixin, JoystickMixin, TripleActionKeysMixin, Model

deviceId = b'a'

Device identifier, used in the protocol to identify the device @type: string

numCells = 16

Number of braille cells @type: int

genericName = 'Actilino'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Actilino'

Specific name of this model @type: string

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.handyTech.ActiveStar40(*args, **kwargs)

Bases: TimeSyncFirmnessMixin, AtcMixin, TripleActionKeysMixin, Model

deviceId = b'd'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

name = 'Active Star 40'

Specific name of this model @type: string

genericName = 'Active Star'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.handyTech.Braillino(*args, **kwargs)

Bases: TripleActionKeysMixin, OldProtocolMixin, Model

deviceId = b'r'

Device identifier, used in the protocol to identify the device @type: string

numCells = 20

Number of braille cells @type: int

genericName = 'Braillino'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Braillino'

Specific name of this model @type: string

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.BrailleWave(*args, **kwargs)

Bases: OldProtocolMixin, Model

deviceId = b'\x05'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

genericName = 'Braille Wave'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Braille Wave'

Specific name of this model @type: string

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

_abc_impl = <_abc._abc_data object>
keys
class brailleDisplayDrivers.handyTech.BasicBraille(*args, **kwargs)

Bases: Model

genericName = 'Basic Braille'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_name()
_abc_impl = <_abc._abc_data object>
name

Specific name of this model @type: string

_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.BasicBraillePlus(*args, **kwargs)

Bases: TripleActionKeysMixin, Model

genericName = 'Basic Braille Plus'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_name()
_abc_impl = <_abc._abc_data object>
name

Specific name of this model @type: string

_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
brailleDisplayDrivers.handyTech.basicBrailleFactory(numCells, deviceId)
brailleDisplayDrivers.handyTech.basicBraillePlusFactory(numCells, deviceId)
class brailleDisplayDrivers.handyTech.BrailleStar(*args, **kwargs)

Bases: TripleActionKeysMixin, Model

genericName = 'Braille Star'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_name()
_abc_impl = <_abc._abc_data object>
name

Specific name of this model @type: string

_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.BrailleStar40(*args, **kwargs)

Bases: BrailleStar

deviceId = b't'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.BrailleStar80(*args, **kwargs)

Bases: BrailleStar

deviceId = b'x'

Device identifier, used in the protocol to identify the device @type: string

numCells = 80

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.Modular(*args, **kwargs)

Bases: StatusCellMixin, TripleActionKeysMixin, OldProtocolMixin, Model

genericName = 'Modular'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_name()
_abc_impl = <_abc._abc_data object>
name

Specific name of this model @type: string

_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.Modular20(*args, **kwargs)

Bases: Modular

deviceId = b'\x80'

Device identifier, used in the protocol to identify the device @type: string

numCells = 20

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.Modular40(*args, **kwargs)

Bases: Modular

deviceId = b'\x89'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.Modular80(*args, **kwargs)

Bases: Modular

deviceId = b'\x88'

Device identifier, used in the protocol to identify the device @type: string

numCells = 80

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.handyTech.Activator(*args, **kwargs)

Bases: ActiveSplitMixin, TimeSyncFirmnessMixin, AtcMixin, JoystickMixin, TripleActionKeysMixin, Model

deviceId = b'\xa4'

Device identifier, used in the protocol to identify the device @type: string

numCells = 40

Number of braille cells @type: int

genericName = 'Activator'

A generic name that identifies the model/series, used in gesture identifiers @type: string

name = 'Activator'

Specific name of this model @type: string

_get_keys() Dict[int, str]

Add the joystick keys to the keys property

_abc_impl = <_abc._abc_data object>
keys
class brailleDisplayDrivers.handyTech.ActivatorPro(*args, **kwargs)

Bases: ActiveSplitMixin, TimeSyncFirmnessMixin, AtcMixin, TripleActionKeysMixin, Model

genericName = 'Activator Pro'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_name()
_get_keys() Dict[int, str]

Add the triple action keys to the keys property

_abc_impl = <_abc._abc_data object>
keys
name

Specific name of this model @type: string

class brailleDisplayDrivers.handyTech.ActivatorPro64(*args, **kwargs)

Bases: ActivatorPro

deviceId = b'\xa6'

Device identifier, used in the protocol to identify the device @type: string

numCells = 64

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.handyTech.ActivatorPro80(*args, **kwargs)

Bases: ActivatorPro

deviceId = b'\xa8'

Device identifier, used in the protocol to identify the device @type: string

numCells = 80

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
brailleDisplayDrivers.handyTech._allSubclasses(cls)

List all direct and indirect subclasses of cls

This function calls itself recursively to return all subclasses of cls.

@param cls: the base class to list subclasses of @type cls: class @rtype: [class]

class brailleDisplayDrivers.handyTech.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver, ScriptableObject

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'handyTech'

The name of the driver; must be the original module file name. @type: str

description = 'Handy Tech braille displays'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

receivesAckPackets: bool = True

Whether displays for this driver return acknowledgements for sent packets. L{_handleAck} should be called when an ACK is received. Note that thread safety is required for the generic implementation to function properly. If a display is not thread safe, a driver should manually implement ACK processing.

timeout: float = 0.2

Maximum timeout to use for communication with a device (in seconds). This can be used for serial connections. Furthermore, it is used to stop waiting for missed acknowledgement packets.

_sleepcounter = 0
_messageWindow = None
_instances = set()
classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

_dev: Hid | Serial | None
classmethod createMessageWindow()
classmethod destroyMessageWindow()
goToSleep()
wakeUp()
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_get_supportedSettings()

The settings supported by the AutoSettings instance. Abstract.

_get_atc()
_set_atc(state)
_get_dotFirmness()
_set_dotFirmness(value)
sendPacket(packetType: bytes, data: bytes = b'')
sendExtendedPacket(packetType: bytes, data: bytes = b'')
_sendHidPacket(packet: bytes)
_handleKeyRelease()
_hidOnReceive(data: bytes)
_hidSerialOnReceive(data: bytes)
_processHidSerialBuffer()
_serialOnReceive(data: bytes)
_handleInputStream(htPacketType: bytes, stream)
_handleInput(key: int)
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

scriptCategory = 'Braille'
script_toggleBrailleInput(_gesture)

Toggle braille input

__gestures = {'br(handytech):leftSpace+b1+b3+b4': 'toggleBrailleInput', 'br(handytech):rightSpace+b1+b3+b4': 'toggleBrailleInput', 'br(handytech):space+b1+b3+b4': 'toggleBrailleInput', 'br(handytech):space+dot1+dot2+dot7': 'toggleBrailleInput', 'br(handytech.easybraille):left+b1+b3+b4': 'toggleBrailleInput', 'br(handytech.easybraille):right+b1+b3+b4': 'toggleBrailleInput'}
gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
property atc
property dotFirmness
supportedSettings: SupportedSettingType

Typing for auto property L{_get_supportedSettings}

class brailleDisplayDrivers.handyTech.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'handyTech'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
_calculateDots()

brailleDisplayDrivers.hedoMobilLine module

class brailleDisplayDrivers.hedoMobilLine.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'hedoMobilLine'

The name of the driver; must be the original module file name. @type: str

description = 'hedo MobilLine USB'

A description of the driver. @type: str

numCells: int = 40

typing information for autoproperty _get_numCells

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

handleResponses(wait=False)
handleData(data: int)
gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.hedoMobilLine.InputGestureKeys(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'hedoMobilLine'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.hedoMobilLine.InputGestureRouting(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'hedoMobilLine'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.hedoProfiLine module

class brailleDisplayDrivers.hedoProfiLine.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'hedoProfiLine'

The name of the driver; must be the original module file name. @type: str

description = 'hedo ProfiLine USB'

A description of the driver. @type: str

numCells: int = 80

typing information for autoproperty _get_numCells

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

handleResponses(wait=False)
handleData(data: int)
gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.hedoProfiLine.InputGestureKeys(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'hedoProfiLine'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.hedoProfiLine.InputGestureRouting(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'hedoProfiLine'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.hidBrailleStandard module

brailleDisplayDrivers.hidBrailleStandard.isSupportEnabled() bool
class brailleDisplayDrivers.hidBrailleStandard.BraillePageUsageID(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

UNDEFINED = 0
BRAILLE_DISPLAY = 1
BRAILLE_ROW = 2
EIGHT_DOT_BRAILLE_CELL = 3
SIX_DOT_BRAILLE_CELL = 4
NUMBER_OF_BRAILLE_CELLS = 5
SCREEN_READER_CONTROL = 6
SCREEN_READER_IDENTIFIER = 7
ROUTER_SET_1 = 250
ROUTER_SET_2 = 251
ROUTER_SET_3 = 252
ROUTER_KEY = 256
ROW_ROUTER_KEY = 257
BRAILLE_BUTTONS = 512
BRAILLE_KEYBOARD_DOT_1 = 513
BRAILLE_KEYBOARD_DOT_2 = 514
BRAILLE_KEYBOARD_DOT_3 = 515
BRAILLE_KEYBOARD_DOT_4 = 516
BRAILLE_KEYBOARD_DOT_5 = 517
BRAILLE_KEYBOARD_DOT_6 = 518
BRAILLE_KEYBOARD_DOT_7 = 519
BRAILLE_KEYBOARD_DOT_8 = 520
BRAILLE_KEYBOARD_SPACE = 521
BRAILLE_KEYBOARD_LEFT_SPACE = 522
BRAILLE_KEYBOARD_RIGHT_SPACE = 523
BRAILLE_FACE_CONTROLS = 524
BRAILLE_LEFT_CONTROLS = 525
BRAILLE_RIGHT_CONTROLS = 526
BRAILLE_TOP_CONTROLS = 527
BRAILLE_JOYSTICK_CENTER = 528
BRAILLE_JOYSTICK_UP = 529
BRAILLE_JOYSTICK_DOWN = 530
BRAILLE_JOYSTICK_LEFT = 531
BRAILLE_JOYSTICK_RIGHT = 532
BRAILLE_DPAD_CENTER = 533
BRAILLE_DPAD_UP = 534
BRAILLE_DPAD_DOWN = 535
BRAILLE_DPAD_LEFT = 536
BRAILLE_DPAD_RIGHT = 537
BRAILLE_PAN_LEFT = 538
BRAILLE_PAN_RIGHT = 539
BRAILLE_ROCKER_UP = 540
BRAILLE_ROCKER_DOWN = 541
BRAILLE_ROCKER_PRESS = 542
class brailleDisplayDrivers.hidBrailleStandard.ButtonCapsInfo(buttonCaps: hidpi.HIDP_VALUE_CAPS, relativeIndexInCollection: int = 0)

Bases: object

buttonCaps: HIDP_VALUE_CAPS
relativeIndexInCollection: int = 0
class brailleDisplayDrivers.hidBrailleStandard.HidBrailleDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'hidBrailleStandard'

The name of the driver; must be the original module file name. @type: str

description = 'Standard HID Braille Display'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

_dev: Hid
_findCellValueCaps() list[HIDP_VALUE_CAPS]
_findNumberOfCellsValueCaps() HIDP_VALUE_CAPS | None
_collectInputButtonCapsByDataIndex()
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_hidOnReceive(data: bytes)
_handleKeyRelease()
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
class brailleDisplayDrivers.hidBrailleStandard.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'hidBrailleStandard'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
_usageIDToGestureName(usagePage: int, usageID: int)
brailleDisplayDrivers.hidBrailleStandard.BrailleDisplayDriver

alias of HidBrailleDriver

brailleDisplayDrivers.hims module

class brailleDisplayDrivers.hims.Model(*args, **kwargs)

Bases: AutoPropertyObject

Extend from this base class to define model specific behavior.

deviceId = b''

Two bytes device identifier, used in the protocol to identify the device @type: bytes

name = ''

A generic name that identifies the model/series, used in gesture identifiers @type: string

numCells = 0

Number of braille cells @type: int

usbId = ''

The USB VID and PID for this model in the form VID_xxxx&PID_xxxx @type: string

bluetoothPrefix = ''

The bluetooth prefix used by devices of this specific model @type: string

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleSense(*args, **kwargs)

Bases: Model

name = 'Braille Sense'

A generic name that identifies the model/series, used in gesture identifiers @type: string

usbId = 'VID_045E&PID_930A'

The USB VID and PID for this model in the form VID_xxxx&PID_xxxx @type: string

bluetoothPrefix = 'BrailleSense'

The bluetooth prefix used by devices of this specific model @type: string

numCells = 0

Number of braille cells @type: int

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleEdge(*args, **kwargs)

Bases: Model

deviceId = b'BE'

Two bytes device identifier, used in the protocol to identify the device @type: bytes

name = 'Braille Edge'

A generic name that identifies the model/series, used in gesture identifiers @type: string

usbId = 'VID_045E&PID_930B'

The USB VID and PID for this model in the form VID_xxxx&PID_xxxx @type: string

bluetoothPrefix = 'BrailleEDGE'

The bluetooth prefix used by devices of this specific model @type: string

numCells = 40

Number of braille cells @type: int

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleEdge2S(*args, **kwargs)

Bases: BrailleEdge

This device is the BrailleEdge which doesn’t use the hims driver. It only uses a SPP connection.

usbId = 'VID_1A86&PID_55D3'

The USB VID and PID for this model in the form VID_xxxx&PID_xxxx @type: string

_get_keys() dict[str, str]

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleEdge3S(*args, **kwargs)

Bases: BrailleEdge

This device is the BrailleEdge which doesn’t use the hims driver. It only uses a Braille HID connection.

usbId = 'VID_045E&PID_940A'

The USB VID and PID for this model in the form VID_xxxx&PID_xxxx @type: string

_get_keys() dict[str, str]

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleSense2S(*args, **kwargs)

Bases: BrailleSense

Braille Sense with one scroll key on both sides. Also referred to as Braille Sense Classic.

name = 'Braille Sense Classic'

A generic name that identifies the model/series, used in gesture identifiers @type: string

deviceId = b'BS'

Two bytes device identifier, used in the protocol to identify the device @type: bytes

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleSense4S(*args, **kwargs)

Bases: BrailleSense

deviceId = b'LX'

Two bytes device identifier, used in the protocol to identify the device @type: bytes

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.SmartBeetle(*args, **kwargs)

Bases: BrailleSense4S

Subclass for Smart Beetle device, which has the same identifier as the Braille Sense with 4 scroll keys. However, it is distinguishable by the number of cells. Furthermore, the key codes for f2 and f4 are swapped, and it has only two scroll keys.

numCells = 14

Number of braille cells @type: int

bluetoothPrefix = 'SmartBeetle(b)'

The bluetooth prefix used by devices of this specific model @type: string

name = 'Smart Beetle'

A generic name that identifies the model/series, used in gesture identifiers @type: string

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleSenseQ(*args, **kwargs)

Bases: BrailleSense4S

deviceId = b'QX'

Two bytes device identifier, used in the protocol to identify the device @type: bytes

name = 'Braille Sense QWERTY'

A generic name that identifies the model/series, used in gesture identifiers @type: string

numCells = 32

Number of braille cells @type: int

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleSenseQX(*args, **kwargs)

Bases: BrailleSenseQ

Special identifier to support QWERTY input

deviceId = b'SX'

Two bytes device identifier, used in the protocol to identify the device @type: bytes

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.SyncBraille(*args, **kwargs)

Bases: Model

name = 'SyncBraille'

A generic name that identifies the model/series, used in gesture identifiers @type: string

usbId = 'VID_0403&PID_6001'

The USB VID and PID for this model in the form VID_xxxx&PID_xxxx @type: string

_get_keys()

Basic keymap

This returns a basic keymap with sensible defaults for all devices. Subclasses should override or extend this method to add model specific keys, or relabel keys. Even if a key isn’t available on all devices, add it here if it would make sense for most devices.

The Hims protocol uses a 4 bytes value for key identification. Bit shifting is used to make clear what byte is used for what key. For example: 0x001 represents a key code that will be received in the first byte, 0x001<<8 represents a key code that will be received in the second byte, etc.

_abc_impl = <_abc._abc_data object>
keys
_propertyCache: Set[Callable[[AutoPropertyObject], Any]]
class brailleDisplayDrivers.hims.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'hims'

The name of the driver; must be the original module file name. @type: str

description = 'HIMS Braille Sense/Braille EDGE/Smart Beetle/Sync Braille series'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

timeout: float = 0.2

Maximum timeout to use for communication with a device (in seconds). This can be used for serial connections. Furthermore, it is used to stop waiting for missed acknowledgement packets.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts() Iterator[tuple[str, str]]

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

_sendCellCountRequest()
_sendIdentificationRequests(match: DeviceMatch)
_handleIdentification(recvId: bytes)
_handlePacket(packet: bytes)
_hidOnReceive(data: bytes)
_onReceive(data: bytes)
_accumulateSerialData(data: bytes) bool
_processSerialData(firstByte: bytes, stream)
_sendPacket(packetType: bytes, mode: bytes, data1: bytes, data2: bytes = b'')
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.hims.KeyInputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'hims'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.hims.RoutingInputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
source = 'hims'

brailleDisplayDrivers.lilli module

brailleDisplayDrivers.lilli.convertLilliCells(cell: int) int
class brailleDisplayDrivers.lilli.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'lilli'

The name of the driver; must be the original module file name. @type: str

description = 'MDV Lilli'

A description of the driver. @type: str

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_get_numCells() int

Obtain the number of braille cells on this display. @note: 0 indicates that braille should be disabled. @note: For multi line displays, this is the total number of cells (e.g. numRows * numCols) @return: The number of cells.

_handleKeyPresses()
_onKeyPress(key: int)
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
numCells: int

typing information for autoproperty _get_numCells

_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.lilli.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'lilli'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.nattiqbraille module

class brailleDisplayDrivers.nattiqbraille.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'nattiqbraille'

The name of the driver; must be the original module file name. @type: str

description = 'Nattiq nBraille'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_describe()
_onReceive(command)
display(cells)

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.nattiqbraille.InputGestureKeys(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'nattiqbraille'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.nattiqbraille.RoutingInputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture

_abc_impl = <_abc._abc_data object>
source = 'nattiqbraille'
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.noBraille module

class brailleDisplayDrivers.noBraille.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

A dummy braille display driver used to disable braille in NVDA.

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'noBraille'

The name of the driver; must be the original module file name. @type: str

description = 'No braille'

A description of the driver. @type: str

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.papenmeier module

brailleDisplayDrivers.papenmeier.brl_auto_id() bytes

send auto id command to braille display

brailleDisplayDrivers.papenmeier._swapDotBits(d: int) List[int]
brailleDisplayDrivers.papenmeier.brl_out(data: List[int], nrk: int, nlk: int, nv: int) bytes

write data to braille cell with nv vertical cells, nrk cells right and nlk cells left some papenmeier displays have vertical cells, other displays have dummy cells with keys

brailleDisplayDrivers.papenmeier.brl_poll(dev: Serial) bytes

read sequence from braille display

class brailleDisplayDrivers.papenmeier.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver, ScriptableObject

papenmeier braille display driver.

initialize driver

name = 'papenmeier'

The name of the driver; must be the original module file name. @type: str

description = 'Papenmeier BRAILLEX newer models'

A description of the driver. @type: str

classmethod check()

should return false if there is a missing dependency

connectBluetooth()

try to connect to bluetooth device first, bluetooth is only supported on Braillex Trio

connectUSB(devlist: List[bytes])

Try to connect to usb device, this is triggered when bluetooth connection could not be established

_dev: Serial
_abc_impl = <_abc._abc_data object>
startTimer()

start timers used by this driver

stopTimer()

stop all timers

initmapping()
terminate()

free resources used by this driver

display(cells: List[int])

write to braille display

executeGesture(gesture)

executes a gesture

_handleKeyPresses()

handles key presses and performs a gesture

gestureMap: inputCore.GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

brailleDisplayDrivers.papenmeier.brl_decode_trio(keys: bytes) List[int]

decode routing keys on Trio

brailleDisplayDrivers.papenmeier.brl_decode_keys_A(data: bytes, start: int, voffset: int) List[int]

decode routing keys non Trio devices

brailleDisplayDrivers.papenmeier.brl_decode_key_names_repeat(driver: BrailleDisplayDriver) List[str]

translate key names for protocol A with repeat

brailleDisplayDrivers.papenmeier.brl_decode_key_names(driver: BrailleDisplayDriver) List[str]

translate key names for protocol A

brailleDisplayDrivers.papenmeier.brl_join_keys(dec: List[str]) str

join key names with comma, this is used for key combinations

class brailleDisplayDrivers.papenmeier.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

Input gesture for papenmeier displays

create an input gesture and decode keys

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
source = 'papenmeier'

brailleDisplayDrivers.papenmeier_serial module

brailleDisplayDrivers.papenmeier_serial.brl_auto_id() bytes

send auto id command to braille display

brailleDisplayDrivers.papenmeier_serial.brl_out(offset: int, data: List[int]) bytes

send data to braille display @param offset: Must be positive.

brailleDisplayDrivers.papenmeier_serial.brl_poll(dev: Serial) bytes

read data from braille display, used by keypress handler

class brailleDisplayDrivers.papenmeier_serial.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver, ScriptableObject

papenmeier_serial braille display driver.

Initializes braille display driver

name = 'papenmeier_serial'

The name of the driver; must be the original module file name. @type: str

description = 'Papenmeier BRAILLEX older models'

A description of the driver. @type: str

classmethod check()

should return false if there is a missing dependency

classmethod getPossiblePorts()

Returns possible hardware ports for this driver. Optionally and in addition to the values from L{getManualPorts}, three special values may be returned if the driver supports them, “auto”, “usb”, and “bluetooth”.

Generally, drivers shouldn’t implement this method directly. Instead, they should provide automatic detection data via L{bdDetect} and implement L{getPossibleManualPorts} if they support manual ports such as serial ports.

@return: Ordered dictionary for each port a (key : value) of name : translated description.

initTable()

do not use braille builtin table

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
terminate()

free resources

display(cells: List[int])

write data to braille display

executeGesture(gesture)

execute a gesture

_handleKeyPresses()

if a button was pressed an input gesture is executed

gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

brailleDisplayDrivers.papenmeier_serial.brl_keyname2(keys: int) str

returns keyname for key index on displays with eab

brailleDisplayDrivers.papenmeier_serial.brl_keyname(keyindex: int, driver: BrailleDisplayDriver) str

returns keyname for key index

class brailleDisplayDrivers.papenmeier_serial.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture

input gesture class for papenmeier_serial displays used only by the driver

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
source = 'papenmeier_serial'

brailleDisplayDrivers.seika module

class brailleDisplayDrivers.seika.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'seika'

The name of the driver; must be the original module file name. @type: str

description = 'Seika Braille Displays'

A description of the driver. @type: str

classmethod check()

Determine whether this braille display is available. The display will be excluded from the list of available displays if this method returns C{False}. For example, if this display is not present, C{False} should be returned. @return: C{True} if this display is available, C{False} if not.

numCells: int = 0

typing information for autoproperty _get_numCells

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

handleResponses()
_handleCursorRoutingBlock(chars: bytes) None
_handleNormalKey(chars: bytes) None
gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.seika.InputGestureKeys(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'seika'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.seika.InputGestureRouting(*args, **kwargs)

Bases: BrailleDisplayGesture

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
source = 'seika'

brailleDisplayDrivers.seikantk module

Braille display driver for Seika Notetaker, a product from Nippon Telesoft see www.seika-braille.com for more details

brailleDisplayDrivers.seikantk.SEIKA_CMD_ON = b'A\x01'

Unknown why this is required. Used for HID (via setFeature), but not for serial.

brailleDisplayDrivers.seikantk.isSeikaBluetoothName(bluetoothName: str) bool
brailleDisplayDrivers.seikantk.isSeikaBluetoothDeviceInfo(deviceInfo: Dict[str, str]) bool
brailleDisplayDrivers.seikantk.isSeikaBluetoothDeviceMatch(match: DeviceMatch) bool
class brailleDisplayDrivers.seikantk.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'seikantk'

The name of the driver; must be the original module file name. @type: str

description = 'Seika Notetaker'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts() Iterator[Tuple[str, str]]

@return: An iterator containing the name and description for each port.

_getDeviceInfo(dev: IoBase) bool
terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

_onReceiveHID(data: bytes)

Three bytes at a time expected, only the middle byte is used to construct the command, the first and third byte are discarded.

_onReceiveSerial(data: bytes)

One byte at a time is expected

_onReceive(newByte: bytes)

Note: Further insight into this function would be greatly appreciated. This function is a very simple state machine, each stage represents the collection of a field, when all fields are collected the command they represent can be processed.

On each call to _onReceive the new byte is appended to a buffer. The buffer is accumulated until the buffer has the required number of bytes for the field being collected. There are 3 fields to be collected before a command can be processed: 1: first 3 bytes: command 2: 1 byte: specify length of subsequent arguments in bytes 3: variable length: arguments for command type

After accumulating enough bytes for each phase, the buffer is cleared and the next stage is entered.

_processCommand(command: bytes, arg: bytes) None
_handleInfo(arg: bytes)

After sending a request for information from the braille device this data is returned to complete the handshake.

_handleRouting(arg: bytes)
_handleKeys(arg: bytes)
_handleKeysRouting(arg: bytes)
gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
class brailleDisplayDrivers.seikantk.InputGestureRouting(*args, **kwargs)

Bases: BrailleDisplayGesture

source = 'seikantk'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]
brailleDisplayDrivers.seikantk._getKeyNames(keys: int, names: Dict[int, str]) Set[str]

Converts a bitset of hardware buttons and keys to their equivalent names

brailleDisplayDrivers.seikantk._getRoutingIndexes(routingKeyBytes: bytes) Set[int]

Converts a bitset of routing keys to their 0-index, up to 15 or 39 depending on the device

class brailleDisplayDrivers.seikantk.InputGesture(*args, **kwargs)

Bases: BrailleDisplayGesture, BrailleInputGesture

source = 'seikantk'
_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]

brailleDisplayDrivers.superBrl module

class brailleDisplayDrivers.superBrl.BrailleDisplayDriver(*args, **kwargs)

Bases: BrailleDisplayDriver

Constructor @param port: Information on how to connect to the device.

Use L{_getTryPorts} to normalise to L{DeviceMatch} instances. - A string (from config “config.conf[“braille”][name][“port”]”). When manually configured.

This value is set via the settings dialog, the source of the options provided to the user is the BrailleDisplayDriver.getPossiblePorts method.

  • A L{DeviceMatch} instance. When automatically detected.

name = 'superBrl'

The name of the driver; must be the original module file name. @type: str

description = 'SuperBraille'

A description of the driver. @type: str

isThreadSafe: bool = True

Whether this driver is thread-safe. If it is, NVDA may initialize, terminate or call this driver on any thread. This allows NVDA to read from and write to the display in the background, which means the rest of NVDA is not blocked while this occurs, thus resulting in better performance. This is also required to use the L{hwIo} module.

supportsAutomaticDetection: bool = True

Whether this driver is supported for automatic detection of braille displays.

classmethod registerAutomaticDetection(driverRegistrar: DriverRegistrar)

This method may register the braille display driver in the braille display automatic detection framework. The framework provides a L{bdDetect.DriverRegistrar} object as its only parameter. The methods on the driver registrar can be used to register devices or device scanners. This method should only register itself with the bdDetect framework, and should refrain from doing anything else. Drivers with L{supportsAutomaticDetection} set to C{True} must implement this method. @param driverRegistrar: An object containing several methods to register device identifiers for this driver.

classmethod getManualPorts()

Get possible manual hardware ports for this driver. This is for ports which cannot be detected automatically such as serial ports. @return: An iterator containing the name and description for each port.

terminate()

Terminate this display driver. This will be called when NVDA is finished with this display driver. It should close any open connections, perform cleanup, etc. Subclasses should call the superclass method first. @postcondition: This instance can no longer be used unless it is constructed again.

_onReceive(data: bytes)
display(cells: List[int])

Display the given braille cells. @param cells: The braille cells to display. @type cells: [int, …]

gestureMap: GlobalGestureMap | None = <inputCore.GlobalGestureMap object>

Global input gesture map for this display driver.

_abc_impl = <_abc._abc_data object>
_propertyCache: Set[GetterMethodT]