feat: keyboard waves A/B — global shortcut registry, question row machine, Esc-cancel dictation

Wave A (owner key map): registry in src/core/keyboard.ts + KeyboardShortcuts
provider; Cmd+D dictation, Cmd+K model picker, Shift+Tab thinking cycle,
Cmd+B sidebar, Cmd+Shift+F sessions search, Alt+arrows session cycle,
Alt+Enter open, Cmd+G graph, Cmd+N new, F2 rename, ? cheat sheet. Tab
fully suppressed; Esc chain popover > dictation > abort (local stream).
Esc now CANCELS dictation (discard) — flush stays on Cmd+D/Stop. Owner
bug reports fixed: focus outline removed, Alt+Enter setState-in-render,
Cmd+F graph node search (surface-scoped lh:kbd-find).

Wave B: question dock row machine — arrows walk options + dont-know/Other
with wrap + ring highlight, Space picks (mirrors click semantics), Enter
submits when canSubmit; typing surfaces and in-dock keys keep native
behavior. aria-checked={isSel} restored on option buttons.

docs/keyboard.md records the full map.
This commit is contained in:
amosblomqvist
2026-09-17 21:18:56 +03:00
parent 682edde844
commit 8b158972db
11 changed files with 232 additions and 38 deletions
-13
View File
@@ -338,16 +338,3 @@ body {
.lh-electron .lh-closed-toggle {
margin-left: 92px;
}
/* ─────────────────────────────────────────────────────────────────────────
Keyboard focus ring (shortcut wave A, 2026-09-17). Browser Tab-focus
navigation is ABANDONED by owner decision (Tab is suppressed at the
window level — see components/keyboard-shortcuts.tsx; Shift+Tab cycles
the thinking level instead), so this ring should almost never appear.
It exists as belt-and-braces: if focus ever lands somewhere via script,
it glows in the app's own accent, not Chromium's default blue.
───────────────────────────────────────────────────────────────────────── */
:focus-visible {
outline: 1.5px solid color-mix(in srgb, var(--lh-ink-strong, #c96b4a) 75%, transparent);
outline-offset: 1px;
}