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:
- Go to any page on the DevPath application.
- Ensure no input fields are currently focused.
- Press
Shift + / to type the ? character.
- 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.
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 expectsshiftKeyto befalse. However, typing?on most standard keyboards inherently requires pressing the Shift key. This causes the strict equality checkwantsShift === e.shiftKeyto evaluate tofalse === true, silently discarding the keypress.To Reproduce
Steps to reproduce the behavior:
Shift+/to type the?character.Expected behavior
Pressing
?(which impliesShift+/) should successfully open the Keyboard Shortcut Legend overlay, as advertised in the legend UI.Screenshots
N/A
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
File affected:
src/hooks/useKeyboardShortcuts.ts. ThematchesCombofunction needs to normalize or bypass the shift check for certain punctuation characters.