DotPad: Add multi-button combinations and long press support#19565
DotPad: Add multi-button combinations and long press support#19565bramd wants to merge 1 commit intonvaccess:masterfrom
Conversation
This enables complex gestures with multiple buttons pressed simultaneously and detection of long presses (1.5 second threshold). Key changes: - Add DP_KeyGroup enum to identify key groups (FUNCTION, PERKINS, etc.) - Track pressed keys across multiple groups with state management - Fire gestures only when all keys released (enables combinations) - Detect long presses with time-based threshold - Replace DPKeyGesture with enhanced DPInputGesture class - Support gesture IDs like "f1+panLeft" and "longPress(panLeft)" - Update gesture map to use camelCase (panLeft/panRight)
5b5eeac to
dd1070d
Compare
|
Hi @bramd - I just want to confirm with the team whether or not we want long press support in NVDA properly or just for this device. I think we may want to ensure long-presses are available for all gestures and part of our framework |
| "braille_scrollBack": ("br(dotPad):panLeft",), | ||
| "braille_scrollForward": ("br(dotPad):panRight",), |
There was a problem hiding this comment.
please also update they keys in the user guide
|
|
||
|
|
||
| # Long press threshold in seconds | ||
| LONG_PRESS_THRESHOLD: float = 1.5 |
There was a problem hiding this comment.
I think this needs to be configurable, otherwise people with varying dexterity abilities cannot adjust it adequately. For example, some people would be long pressing every key, and high dexterity people might want to lower it. Related WCAG.
I think we would want a setting like multi press timeout
|
|
||
| # Build gesture ID | ||
| baseId = "+".join(self.keyNames) | ||
| self.id = f"longPress({baseId})" if isLongPress else baseId |
There was a problem hiding this comment.
I think we need to add longpress spec information to InputGesture and the developer guide
Link to issue number:
None
Summary of the issue:
The current Dot Pad driver only supports single-button input gestures.
Description of user facing changes:
Multi-button input gestures are now supported and can be mapped to NVDA functionality. Long-press gestures (hold over 1.5 seconds) are detected and can trigger different functionality.
Description of developer facing changes:
Only internal changes in the Dot Pad driver, see below under "Development Approach".
Description of development approach:
Testing strategy:
Known issues with pull request:
Code Review Checklist: