Skip to content

[BUG] Broken Keyboard Shortcut for Shift-Modified Characters (Functional Bug) #670

Description

@Niteshagarwal01

Describe the bug
The global keyboard shortcut for toggling the Shortcut Legend (?) does not work. The shortcut parser explicitly evaluates whether the Shift key is required by checking if the shortcut string contains "shift". Because the string ['?'] does not contain "shift", it expects shiftKey to be false. However, typing ? on most standard keyboards inherently requires pressing the Shift key. This causes the strict equality check wantsShift === e.shiftKey to evaluate to false === true, silently discarding the keypress.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any page on the DevPath application.
  2. Ensure no input fields are currently focused.
  3. Press Shift + / to type the ? character.
  4. See error: The Shortcut Legend does not open.

Expected behavior
Pressing ? (which implies Shift + /) should successfully open the Keyboard Shortcut Legend overlay, as advertised in the legend UI.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: All
  • Browser: All
  • Version: Latest

Smartphone (please complete the following information):

  • Device: N/A
  • OS: N/A
  • Browser: N/A

Additional context
File affected: src/hooks/useKeyboardShortcuts.ts. The matchesCombo function needs to normalize or bypass the shift check for certain punctuation characters.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions