Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ea08bd0
Add cellIndexes to BrailleDisplayGesture, deprecate routingIndex (#20…
LeonarddeR Apr 22, 2026
40de144
Use None default for cellIndexes and switch to docstring comments
LeonarddeR Apr 23, 2026
b276be9
Generalize idForCellCount for multi-row routing ranges
LeonarddeR Apr 23, 2026
1cc6d8e
Remove unused ID_ROUTING and ID_MULTI_ROUTING constants
LeonarddeR Apr 23, 2026
8e0db96
Add multi-routing to brailliantB and hidBrailleStandard, use self.idF…
LeonarddeR Apr 23, 2026
56b4c10
Make braille multi-routing selection exclusive
LeonarddeR Apr 24, 2026
7330906
Use max(cellIndexes) for routingIndex compat and harden selectToCell
LeonarddeR Apr 28, 2026
08ceb30
seikantk: keep single-int compat for InputGestureRouting
LeonarddeR Apr 28, 2026
48029fa
seikantk: drop redundant list() wrapping of cellIndexes
LeonarddeR Apr 28, 2026
3d84779
Bind multiRouting to braille_selectToCell in supporting drivers
LeonarddeR Apr 28, 2026
2d1c59b
Reword braille_selectToCell user-facing strings to use 'routing keys'
LeonarddeR Apr 28, 2026
e6fff6b
Make BrailleDisplayGesture.idForCellCount a classmethod
LeonarddeR Apr 28, 2026
8953afe
Raise AttributeError on routingIndex when deprecated APIs are disabled
LeonarddeR Apr 28, 2026
7cacaac
Rename script_braille_selectToCell to script_braille_selectRange
LeonarddeR Apr 28, 2026
9f7ace0
Pre-commit auto-fix
pre-commit-ci[bot] Apr 28, 2026
19a9a1b
Trim braille_selectRange script description
LeonarddeR Apr 28, 2026
7f54d8f
Reword braille_selectRange description to reflect exclusive end
LeonarddeR Apr 28, 2026
eef3764
Update tests/unit/test_braille/test_brailleDisplayDrivers.py
LeonarddeR Apr 28, 2026
c7bae13
Fix HID
LeonarddeR Apr 28, 2026
16d781f
Merge branch 'cellIndexes' of https://github.com/leonardder/nvda into…
LeonarddeR Apr 28, 2026
87b1a58
Update description
LeonarddeR Apr 28, 2026
59b37a3
Merge branch 'master' into cellIndexes
LeonarddeR Apr 30, 2026
4d98ff4
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 5, 2026
aa484f8
No longer mark Albatross as supported for multi routing
LeonarddeR May 7, 2026
b4efb8d
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 7, 2026
218ae35
Restore driver level multiRouting but don't assign by default as per …
LeonarddeR May 8, 2026
e542736
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 13, 2026
325de5b
Update changelog
LeonarddeR May 13, 2026
ed6ecf1
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 15, 2026
a9cf47d
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 18, 2026
d78b3da
Fix BAUM_ROUTING_KEY press/release detection and multi-key combos
LeonarddeR May 18, 2026
6a2047e
Add better display names for routing
LeonarddeR May 18, 2026
859f829
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 25, 2026
33a30bb
feat(albatross): bind braille_selectRange to home1/2+multiRouting
LeonarddeR May 25, 2026
d3cc500
docs(changelog): add Albatross to multi routing driver list
LeonarddeR May 25, 2026
5f2ccd8
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 27, 2026
dfdd42e
Fix identifiers
LeonarddeR May 27, 2026
0373057
Fix identifier order
LeonarddeR May 27, 2026
f6893e0
Update headers
LeonarddeR May 27, 2026
bb15450
Merge remote-tracking branch 'origin/master' into cellIndexes
LeonarddeR May 28, 2026
99072af
Address code review feedback
LeonarddeR May 28, 2026
6c01d51
Extend tests
LeonarddeR May 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add multi-routing to brailliantB and hidBrailleStandard, use self.idF…
…orCellCount

- brailliantB: aggregate routing keys into list, support multi-press
- hidBrailleStandard: collect routing keys with prefix, support multi-press
  producing routerSet1_multiRouterKey for simultaneous presses
- Switch all drivers from braille.BrailleDisplayGesture.idForCellCount to
  self.idForCellCount for consistency

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
  • Loading branch information
LeonarddeR and claude committed Apr 28, 2026
commit 8e0db969b7866345996990c13bf6826d1842f423
2 changes: 1 addition & 1 deletion source/brailleDisplayDrivers/albatross/gestures.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(self, keys: Set[int], name: str):
for rangeName, indexes in sorted(cellIndexesByRange.items()):
indexes.sort()
allIndexes.extend(indexes)
names.append(braille.BrailleDisplayGesture.idForCellCount(len(indexes), rangeName))
names.append(self.idForCellCount(len(indexes), rangeName))
self.cellIndexes = allIndexes
self.id = "+".join(names)
# Try to fix the first valid key press was not recognized as a gesture
Expand Down
2 changes: 1 addition & 1 deletion source/brailleDisplayDrivers/alva.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def __init__(self, model, keys, brailleInput=False):
for rangeName, indexes in sorted(cellIndexesByRange.items()):
indexes.sort()
allIndexes.extend(indexes)
idName = braille.BrailleDisplayGesture.idForCellCount(len(indexes), rangeName)
idName = self.idForCellCount(len(indexes), rangeName)
names.append(idName)
if isNoBC640:
secondaryNames.append(idName)
Expand Down
2 changes: 1 addition & 1 deletion source/brailleDisplayDrivers/baum.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ def __init__(self, model, keysDown):
index for index in range(braille.handler.display.numCells) if groupKeysDown & (1 << index)
]
if self.cellIndexes:
names.append(braille.BrailleDisplayGesture.idForCellCount(len(self.cellIndexes)))
names.append(self.idForCellCount(len(self.cellIndexes)))
elif group == BAUM_ROUTING_KEY:
self.cellIndexes = [groupKeysDown - 1]
names.append("routing")
Expand Down
8 changes: 6 additions & 2 deletions source/brailleDisplayDrivers/brailliantB.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ def __init__(self, keys):

self.keyNames = names = []
isBrailleInput = True
routingIndexes: list[int] = []
for key in self.keyCodes:
if isBrailleInput:
if DOT1_KEY <= key <= DOT8_KEY:
Expand All @@ -401,12 +402,15 @@ def __init__(self, keys):
self.dots = 0
self.space = False
if key >= FIRST_ROUTING_KEY:
names.append("routing")
self.cellIndexes = [key - FIRST_ROUTING_KEY]
routingIndexes.append(key - FIRST_ROUTING_KEY)
else:
try:
names.append(KEY_NAMES[key])
except KeyError:
log.debugWarning("Unknown key with id %d" % key)
if routingIndexes:
routingIndexes.sort()
self.cellIndexes = routingIndexes
names.append(self.idForCellCount(len(routingIndexes)))

self.id = "+".join(names)
2 changes: 1 addition & 1 deletion source/brailleDisplayDrivers/handyTech.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ def __init__(self, model, keys, isBrailleInput=False):
if routingIndexes:
routingIndexes.sort()
self.cellIndexes = routingIndexes
names.append(braille.BrailleDisplayGesture.idForCellCount(len(routingIndexes)))
names.append(self.idForCellCount(len(routingIndexes)))

self.id = "+".join(names)

Expand Down
15 changes: 13 additions & 2 deletions source/brailleDisplayDrivers/hidBrailleStandard.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ def __init__(self, driver, dataIndices):
self.keyNames = names = []
namePrefix = None
isBrailleInput = True
routingIndexes: list[int] = []
routingNamePrefix: str | None = None
for index in dataIndices:
buttonCapsInfo = driver._inputButtonCapsByDataIndex.get(index)
Comment thread
LeonarddeR marked this conversation as resolved.
buttonCaps = buttonCapsInfo.buttonCaps
Expand Down Expand Up @@ -354,14 +356,23 @@ def __init__(self, driver, dataIndices):
# We must assume that any input in the router set is a routing key,
# Because some devices expose the routing keys as 1-bit values
# which Windows then combines into a usage range.
self.cellIndexes = [buttonCapsInfo.relativeIndexInCollection]
routingIndexes.append(buttonCapsInfo.relativeIndexInCollection)
usageID = BraillePageUsageID.ROUTER_KEY
# Prefix the gesture name with the specific routing collection name (E.g. routerSet1)
namePrefix = self._usageIDToGestureName(linkUsagePage, linkUsageID)
routingNamePrefix = self._usageIDToGestureName(linkUsagePage, linkUsageID)
continue
name = self._usageIDToGestureName(usagePage, usageID)
if namePrefix:
name = "_".join([namePrefix, name])
names.append(name)
if routingIndexes:
routingIndexes.sort()
self.cellIndexes = routingIndexes
routingIdName = self._usageIDToGestureName(HID_USAGE_PAGE_BRAILLE, BraillePageUsageID.ROUTER_KEY)
routingIdName = self.idForCellCount(len(routingIndexes), routingIdName)
if routingNamePrefix:
routingIdName = "_".join([routingNamePrefix, routingIdName])
names.append(routingIdName)
self.id = "+".join(names)

def _usageIDToGestureName(self, usagePage: int, usageID: int):
Expand Down
2 changes: 1 addition & 1 deletion source/brailleDisplayDrivers/nlseReaderZoomax.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def __init__(self, keysDown: dict[bytes, bytes]):
index for index in range(braille.handler.display.numCells) if groupKeysDown & (1 << index)
]
if self.cellIndexes:
names.append(braille.BrailleDisplayGesture.idForCellCount(len(self.cellIndexes)))
names.append(self.idForCellCount(len(self.cellIndexes)))
else:
for index, name in enumerate(COMMAND_RESPONSE_INFO.get(group).keys):
if groupKeysDown & (1 << index):
Expand Down
2 changes: 1 addition & 1 deletion source/brailleDisplayDrivers/seikantk.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ class InputGestureRouting(braille.BrailleDisplayGesture):
def __init__(self, indexes: list[int]):
super().__init__()
self.cellIndexes = list(indexes)
self.id = braille.BrailleDisplayGesture.idForCellCount(len(self.cellIndexes))
self.id = self.idForCellCount(len(self.cellIndexes))


def _getKeyNames(keys: int, names: Dict[int, str]) -> Set[str]:
Expand Down