Skip to content

DotPad: Add multi-button combinations and long press support#19565

Open
bramd wants to merge 1 commit intonvaccess:masterfrom
bramd:dotpad-enhanced-input-gestures
Open

DotPad: Add multi-button combinations and long press support#19565
bramd wants to merge 1 commit intonvaccess:masterfrom
bramd:dotpad-enhanced-input-gestures

Conversation

@bramd
Copy link
Contributor

@bramd bramd commented Feb 5, 2026

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:

  • 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)

Testing strategy:

  • Enabled input help and checked the following
    • Single button gestures still work and are reported correctly
    • Multi-button short presses are reported correctly and the order of the buttons is consistent
    • Long single/multi-button presses are reported correctly
  • Assigned functions to gestures in Intput Gesturs dialog, checked that they work
  • Checked that existing panLeft/panRight gestures still work

Known issues with pull request:

  • Normalizing gesture names to camelCase may break existing gesture mappings to panLeft/panRight if a user have redefined those

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

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)
@bramd bramd force-pushed the dotpad-enhanced-input-gestures branch from 5b5eeac to dd1070d Compare February 5, 2026 10:24
@bramd bramd marked this pull request as ready for review February 5, 2026 10:28
@bramd bramd requested a review from a team as a code owner February 5, 2026 10:28
@bramd bramd requested a review from seanbudd February 5, 2026 10:28
@seanbudd seanbudd added the blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. label Feb 6, 2026
@seanbudd
Copy link
Member

seanbudd commented Feb 6, 2026

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

Comment on lines +469 to +470
"braille_scrollBack": ("br(dotPad):panLeft",),
"braille_scrollForward": ("br(dotPad):panRight",),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also update they keys in the user guide



# Long press threshold in seconds
LONG_PRESS_THRESHOLD: float = 1.5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add longpress spec information to InputGesture and the developer guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants