Make some minor refactorings of shortcut_registry.ts to improve readability and style, and add documentation for the KeyboardShortcut interface type.
Reason for Changes
It was a bit harder than necessary to grok how this worked (ideally one should not need to read the source code!), so trying to make it easier for others / future self.
Test Coverage
Passes npm test + quick manual verification that shortcuts still work.
The basics
The details
Proposed Changes
Make some minor refactorings of
shortcut_registry.ts
to improve readability and style, and add documentation for theKeyboardShortcut
interface type.Reason for Changes
It was a bit harder than necessary to grok how this worked (ideally one should not need to read the source code!), so trying to make it easier for others / future self.
Test Coverage
Passes
npm test
+ quick manual verification that shortcuts still work.Documentation
Improved, hopefully.