nvda
3304bd48 - Expose number of rows/lines on multiline braille displays (#15386)

Commit
2 years ago
Expose number of rows/lines on multiline braille displays (#15386) Summary of the issue: Currently, NVDA assumes that braille displays always have one line of output. There are no native braille drivers in NVDA that support multi line displays. However, BRLTTY supports a few multi line displays such as the Canute and the DotPad. A first step to supporting these displays would be to treat them as one large display so we can at least output to all their cells. Multi line displays now crash the BRLTTY driver. Description of user facing changes Multi line braille displays can now be used through BRLTTY and will no longer cause the driver to crash. Please note that the display is handled as one large continuous display and no specific features exist to use the multiple braille lines for multi line output. Description of development approach The BRLTTY driver only reads the number of columns and uses that as numCells. This causes a crashing braille driver with multi line displays, since we send not enough cells to fill the display. This PR adds numCols and numRows properties to the BrailleDisplayDriver class and the default for numCells is to return the total number of cells on the display. Setting numCells is still supported for single line displays, but for multi line displays this will raise a ValueError and numCols/numRows should be set explicitly. The BRLTTY driver is modified to set numRows/numCols correctly based on the info from BrlAPI.
Author
Parents
Loading