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:
@@ -3,8 +3,10 @@ import 'package:flutter/material.dart';
|
||||
|
||||
import 'terminal_layout.dart';
|
||||
import 'terminal_scope.dart';
|
||||
import 'terminal_shortcuts.dart';
|
||||
|
||||
/// The shell bar's Terminal button: shows or hides the terminal (Ctrl+`).
|
||||
/// The shell bar's Terminal button: shows or hides the terminal (also
|
||||
/// Alt+T, Ctrl+T, Cmd+T and Ctrl+`, where the platform delivers them).
|
||||
class TerminalToggleButton extends StatelessWidget {
|
||||
const TerminalToggleButton({
|
||||
super.key,
|
||||
@@ -15,7 +17,8 @@ class TerminalToggleButton extends StatelessWidget {
|
||||
final TerminalLayout layout;
|
||||
final bool cupertino;
|
||||
|
||||
static const String label = 'Terminal (Ctrl+`)';
|
||||
/// The tooltip, naming the platform's most convenient shortcut.
|
||||
static String get label => TerminalShortcutLabels.current().button;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Reference in New Issue
Block a user