KeyBindings Module
Turns a key press into an action, using the table in KeyTypes and the context the user is in. This is the only place in Issie that should listen for keys. It replaces five mechanisms that grew independently and never agreed with each other: the Electron menu accelerators, the document.onkeydown reassigned on every render in SheetDisplay, the addEventListener subscription in Renderer, the one React handler in SelectedComponentView, and the arrow-key intercept in Update. KeyTypes says what the shortcuts are; this module says what they do and delivers them.
Types
| Type | Description |
Functions and values
| Function or value | Description |
|
|
|
|
|
|
|
|
Full Usage:
isMac
Returns: bool
|
|
|
Resolve a key event to a KeyName. ev.key alone will not do: on macOS Option rewrites it, so Cmd+Option+A arrives as "a" with a ring over it. ev.code alone will not do either, being physical and so wrong on any layout that is not QWERTY - Ctrl+A on AZERTY is physically KeyQ. So use ev.key wherever it is meaningful and fall back to the physical key only where it is not.
|
|
|
|
|
|
|
|
|
Full Usage:
publishKeyLog ()
Parameters:
unit
|
|
|
|