mirror of
https://github.com/narrrl/narl-workspace.git
synced 2026-11-03 16:41:27 +01:00
keys: one table drives dispatch, help, footers, the rail and the wiki
keymap.ts lists every key with its context, action and help line. actions.ts holds what each one does, typed against the table so a key without an action, or an action without a key, does not compile. modes.ts stacks the contexts (always > sheet > drawer > workspace > writing > focused tile > special > global) and writes the two-key pending logic once. App.svelte's 480-line onkeydown is now one call. Help, the panel footers (a shared Keys component), the rail's keycaps and Commands.md all read the table; the wiki gains the card and scratchpad key tables. One fix on the way: Ctrl-S in the editor no longer saves twice, which could make the second save fail as "changed somewhere else".
This commit is contained in:
1 parent
7f8a3816d3
commit
0eabcb2333
23 files changed
+1215
-1523
No files matched your search
@@ -43,6 +43,12 @@ export const hooks = {
|
||||
openCommandLine: (_initial: string) => {},
|
||||
/** Ctrl-P: a search across every space. */
|
||||
openGlobalSearch: () => {},
|
||||
/** Esc with the line open but the keyboard elsewhere: the line away; false when it is not open. */
|
||||
closeCommandLine: (): boolean => false,
|
||||
/** `F`: letters over the links and buttons inside `root`. */
|
||||
showHints: (_root: HTMLElement) => {},
|
||||
/** The board on screen, for `F` over its cards. */
|
||||
boardRoot: (): HTMLElement | null => null,
|
||||
}
|
||||
|
||||
/** Help groups the command list under these headings, in this order. */
|
||||
|
||||
Reference in new issue
Block a user