Check for duplicates
Problem
there are multiple scenarios where a keyboard shortcut has multiple possible keys that activate it, yet we only want to display one. for example, both delete and backspace keys activate the delete blocks shortcut, but we only want to display one of them (backspace on windows, delete on mac, and localized)
there is also some logic to make sure that key chords are always shown in the same order, e.g. ctrl+shift+del not del+shift+ctrl.
currently this complex logic lives in the keyboard experiment where it's used for context menus and the shortcut help menu.
Request
add a utility to blockly that "normalizes" the keyboard shortcuts and picks one key combination for shortcuts following the existing logic. probably in utils/. use the logic from the existing keyboard experiment.
Alternatives considered
No response
Additional context
No response
Check for duplicates
Problem
there are multiple scenarios where a keyboard shortcut has multiple possible keys that activate it, yet we only want to display one. for example, both
deleteandbackspacekeys activate thedelete blocksshortcut, but we only want to display one of them (backspace on windows, delete on mac, and localized)there is also some logic to make sure that key chords are always shown in the same order, e.g. ctrl+shift+del not del+shift+ctrl.
currently this complex logic lives in the keyboard experiment where it's used for context menus and the shortcut help menu.
Request
add a utility to blockly that "normalizes" the keyboard shortcuts and picks one key combination for shortcuts following the existing logic. probably in
utils/. use the logic from the existing keyboard experiment.Alternatives considered
No response
Additional context
No response