docs: restructure TASKS.md into a catalog — one file per task in TASKS/

TASKS.md is now the index (status table, open items, research pointer).
33 files: 32 task files + 1 research facts file. The full take-saga
narrative and all design decisions are preserved verbatim; the catalog
makes the queue readable without opening every task body. Schema and
AGENTS.md updated to reflect the new layout.
This commit is contained in:
2026-09-05 16:31:46 -07:00
parent 98d30c2056
commit 87509bcf99
36 changed files with 1698 additions and 1615 deletions
+27
View File
@@ -0,0 +1,27 @@
# TASK 20 — Hotkeys (keyboard shortcuts)
> Catalog: [`TASKS.md`](../TASKS.md) — status and requirements live here.
**Goal:** keyboard shortcuts for scene switching and common actions — the single biggest UX gap.
### Status: ✅ Done — shipped 2026-08-26 (steps 1-2; all 9 checklist items complete; handoff flags it shipped)
1. ✅ `GlobalHotkeyManager` service — `Services/GlobalHotkeys.cs`: registers OS-level hotkeys on the window HWND via `RegisterHotKey`/`WM_HOTKEY` (`IHotkeyRegistrar` seam for tests; `RegistrarOverride` mirrors `LayoutPathOverride`). Wired in `MainWindow.OnSourceInitialized`.
2. ✅ Scene switching hotkeys — F1-F5 stage/transition the five canonical scenes.
3. ✅ Common action hotkeys — F6 start/end stream, F7 mute mic, F8 mute desktop audio, F9 TRAX play/pause. Dispatch lives in `MainViewModel.HandleHotkey` and honors command gating.
4. ✅ Hotkey configuration UI — `HotkeyConfigDialog` (XAML Window + `HotkeyConfigViewModel`). Click-to-capture, "Unbind" per row, Reset to Defaults. Conflict detection shows a warning; user must unbind the conflicting action first. Modifier chords supported from day 1 (Ctrl+F10, Alt+Shift+F12, etc.).
5. ✅ Global hotkeys — work even when app is not focused (that is what `RegisterHotKey` gives us)
6. ✅ Conflict detection — warns when a chord is already bound to another action; user must unbind first.
7. ✅ Persistence — `LoadHotkeyBindings()` / `SaveHotkeyBindings()` in `LayoutStore`, stored as `"modifiers+vk"` in Settings table. No schema migration needed.
8. ✅ Test: `GlobalHotkeyTests.WmHotkey_StagesScene_And_TogglesMic_And_RevokesOnClose` — real window + fake registrar, a genuine `WM_HOTKEY` posted through the window's own `HwndSource` hook stages the mapped scene and flips mic mute; close revokes every registration.
9. ✅ Test: `HotkeyConfigTests` — round-trip persistence, display string formatting, storage serialization.
### Design decisions
- **Global hotkeys are mandatory** — streamers are in-game and cannot alt-tab. F1-F5 must work from anywhere.
- **Modifier chords from day 1** — Ctrl+F10, Alt+F1, etc. for Stream Deck support and power users.
- **Conflict = warning, not swap** — user must unbind the conflicting action before reassigning. No surprise reassignments.
- **Unbinding** — every action can be set to "None" (no hotkey). Explicitly unbound actions are absent from the DB.
- **No Stream Deck yet** — bare keyboard first. Stream Deck support (physical devices) is v1.1+.