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:
@@ -41,6 +41,27 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
test('the chat switcher uses the Chat chord and names its keys', () {
|
||||
KeyboardShortcutEntry switcher(
|
||||
TargetPlatform platform, {
|
||||
bool web = false,
|
||||
}) => KeyboardShortcutRegistry(
|
||||
platform: platform,
|
||||
web: web,
|
||||
).entries.firstWhere((entry) => entry.action == 'Switch to another chat');
|
||||
|
||||
expect(switcher(TargetPlatform.macOS).keys, 'Option+K, Cmd+K, Ctrl+K');
|
||||
final linux = switcher(TargetPlatform.linux);
|
||||
expect(linux.group, KeyboardShortcutGroup.chat);
|
||||
expect(linux.keys, 'Alt+K, Ctrl+K');
|
||||
expect(linux.caveat, contains('Ctrl+N'));
|
||||
expect(linux.caveat, isNot(contains('browser tab')));
|
||||
expect(
|
||||
switcher(TargetPlatform.linux, web: true).caveat,
|
||||
contains('A browser tab keeps Ctrl+N'),
|
||||
);
|
||||
});
|
||||
|
||||
test('Runs and Pipelines switch is Ctrl+A on every platform', () {
|
||||
for (final platform in TargetPlatform.values) {
|
||||
final entry = KeyboardShortcutRegistry(platform: platform, web: false)
|
||||
|
||||
Reference in New Issue
Block a user