Chat: Ctrl+K / Alt+K on Chat opens a quick switcher for the open chats

On Chat the chord now toggles a centred dialog (bottom sheet on a phone)
with an autofocused filter over the open chats in list order; Ctrl+N/Down
and Ctrl+P/Up move the wrapping selection, Enter opens the chat as Ctrl+Tab
does (pane reused, composer focused), Esc or the chord closes it. From other
destinations the chord still jumps to Chat. Ctrl+N/Ctrl+P are handled so the
web page prevents their defaults (Ctrl+P no longer prints); a browser tab
keeps Ctrl+N reserved, documented in the help and notes/chat-quick-switch.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 12:27:39 +00:00
parent 26b1c00094
commit 141661e355
17 changed files with 1127 additions and 4 deletions
@@ -0,0 +1,30 @@
{
"size": "1280x900",
"params": "chats=8&colors=1&activity=1",
"steps": [
{ "open": "/chat/perf-chat-0" },
{ "wait": 1500 },
{
"eval": "(window.__quickSwitchKeys = [], window.addEventListener('keydown', (e) => { if (e.ctrlKey || e.altKey) setTimeout(() => window.__quickSwitchKeys.push({ key: e.key, prevented: e.defaultPrevented })); }, true), true)",
"name": "record-keydown-defaults"
},
{ "press": "Alt+k", "wait": 800 },
{ "shot": "switcher-open" },
{ "press": "Control+n", "wait": 300 },
{ "press": "Control+n", "wait": 300 },
{ "shot": "switcher-ctrl-n-twice" },
{ "press": "Control+p", "wait": 300 },
{ "type": "s", "wait": 500 },
{ "shot": "switcher-filtered" },
{ "eval": "JSON.stringify(window.__quickSwitchKeys)", "name": "keydown-defaults" },
{
"expect": "window.__quickSwitchKeys.filter((k) => k.key === 'n' || k.key === 'p').length === 3 && window.__quickSwitchKeys.filter((k) => k.key === 'n' || k.key === 'p').every((k) => k.prevented)",
"name": "ctrl-n-and-ctrl-p-default-prevented"
},
{ "press": "Enter", "wait": 1200 },
{ "shot": "switched" },
{ "press": "Alt+k", "wait": 800 },
{ "press": "Alt+k", "wait": 800 },
{ "shot": "toggled-closed" }
]
}