fontra
fontra copied to clipboard
Refactor shortcut logic to new module
The shortcut stuff is currently tied to editor.js, and we should somehow move that to a reusable place.
How about a new module at "core/shortcuts.js"
, providing support code for registering shortcut callbacks, and the key event handlers.
At the same time I wonder if we should create a generic mechanism for menu callbacks and shortcuts to delegate to focused UI elements: so a menu item can work on different UI elements.
Perhaps our current menu callback en shortcut callback approach should be more integrated with each other. Food for thought.
This was fixed by https://github.com/googlefonts/fontra/pull/1632.