mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Add global keyboard EventRouter and unify publish (M6, §01D)
One module owns the document keydown listener and dispatches the shortcut map (Cmd/Ctrl+Shift+N / +K / +S / +, / Escape), platform-aware, via the single-source focus-utils interactive-context gate. Escape and Cmd/Ctrl+S run before the gate so save works while editing; the rest are suppressed mid-typing. Publish + its toast move into services/snippet-actions so the button and Cmd/Ctrl+S behave identically. Removes the ad-hoc keydown handler from App and Monaco's Cmd+S command.
This commit is contained in:
@@ -67,6 +67,10 @@ Notes:
|
||||
|
||||
- Cmd/Ctrl + K is a toggle: if the Datasets manager is already open it closes it; otherwise it opens it.
|
||||
- Escape only acts when a modal is open; with no modal open it does nothing.
|
||||
- Cmd/Ctrl + S publishes the active draft regardless of where focus is — **including
|
||||
while the editor has focus** — so it behaves as a "save" you reach for mid-edit. The
|
||||
other shortcuts (new snippet, toggle Datasets, settings) are suppressed while the
|
||||
user is typing in the editor or an input, so they don't interrupt text entry.
|
||||
- The shortcut actions override the browser's default behavior for those key combinations.
|
||||
|
||||
## E. Navigation & Shareable URL State
|
||||
|
||||
Reference in New Issue
Block a user