87509bcf99
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.
2.5 KiB
2.5 KiB
TASK 20 — Hotkeys (keyboard shortcuts)
Catalog:
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)
- ✅
GlobalHotkeyManagerservice —Services/GlobalHotkeys.cs: registers OS-level hotkeys on the window HWND viaRegisterHotKey/WM_HOTKEY(IHotkeyRegistrarseam for tests;RegistrarOverridemirrorsLayoutPathOverride). Wired inMainWindow.OnSourceInitialized. - ✅ Scene switching hotkeys — F1-F5 stage/transition the five canonical scenes.
- ✅ Common action hotkeys — F6 start/end stream, F7 mute mic, F8 mute desktop audio, F9 TRAX play/pause. Dispatch lives in
MainViewModel.HandleHotkeyand honors command gating. - ✅ 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.). - ✅ Global hotkeys — work even when app is not focused (that is what
RegisterHotKeygives us) - ✅ Conflict detection — warns when a chord is already bound to another action; user must unbind first.
- ✅ Persistence —
LoadHotkeyBindings()/SaveHotkeyBindings()inLayoutStore, stored as"modifiers+vk"in Settings table. No schema migration needed. - ✅ Test:
GlobalHotkeyTests.WmHotkey_StagesScene_And_TogglesMic_And_RevokesOnClose— real window + fake registrar, a genuineWM_HOTKEYposted through the window's ownHwndSourcehook stages the mapped scene and flips mic mute; close revokes every registration. - ✅ 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+.