Toggle the terminal with Alt/Ctrl/Cmd+T, animate it, focus it, and cycle its tabs with Ctrl+Tab

Alt+T, Ctrl+T and Cmd+T join Ctrl+` as early focus-manager key handlers, so
they toggle the panel, window or narrow page from anywhere without reaching
the shell or a text field. Opening with no terminal starts one. The shown
terminal takes the keyboard (also on reload and tab changes) and hiding gives
it back. The panel slides from the bottom edge as the app shrinks, the window
scales and fades, both on Motion.standard and off under reduced motion.
While shown, Ctrl+Tab/Ctrl+Shift+Tab move between terminal tabs instead of
chat panes. The tooltip and menu list the shortcuts the platform delivers.
This commit is contained in:
2026-11-09 23:43:56 +00:00
parent 371d29224c
commit 30934aa71c
22 changed files with 1139 additions and 158 deletions
@@ -154,10 +154,12 @@ mixin _ChatScreenWorkspace on State<ChatScreen> {
/// Ctrl+Tab cycles retained panes even when the sidebar or toolbar owns
/// focus. Over a single pane it swaps in the chat shown before this one
/// instead, and back again (see [_toggleRecentChat]). Command+Tab stays
/// with the operating system's application switcher.
/// with the operating system's application switcher. While the app's
/// terminal is shown, Ctrl+Tab moves between its tabs instead.
bool _cycleChatKey(KeyEvent event) {
final keyboard = HardwareKeyboard.instance;
if (event is! KeyDownEvent ||
TerminalScope.peek(context)?.claimsTabKeys == true ||
event.logicalKey != LogicalKeyboardKey.tab ||
!keyboard.isControlPressed ||
keyboard.isMetaPressed ||
+1
View File
@@ -40,6 +40,7 @@ import 'conversation/composer_selection_focus.dart';
import 'data/chat_repository.dart';
import 'domain/chat_commands.dart';
import 'domain/chat_cycle.dart';
import '../terminal/terminal_scope.dart';
import 'domain/chat_colors.dart';
import 'ui/sessions/chat_color_palette.dart';
import 'ui/sessions/chat_sessions_body.dart';