Terminal: xterm key encoding, no live reflow on resize, Alt+T/Ctrl+T reach the shell
- Live terminals no longer reflow (xterm.dart 4.0.0 left the cursor on the wrong row); narrowing cuts and erases cells past the width, rows scroll into scrollback keeping the cursor row; finished output still reflows. - App-side key encoding before xterm.dart's defaults: Alt as Meta (ESC + the typed character), Ctrl symbol table, xterm modifier parameter for arrows/Home/End/PgUp/PgDn/Ins/Del/F-keys, DECCKM and DECKPAM, Alt+BS. - Settings > Appearance > Terminal: Use Option as Meta key (Macs, on). - Inside a focused terminal only Cmd+T and Ctrl+` toggle it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -90,9 +90,7 @@ class TerminalTestAppState extends State<TerminalTestApp> {
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('App'),
|
||||
actions: [
|
||||
TerminalToggleButton(layout: widget.layout),
|
||||
],
|
||||
actions: [TerminalToggleButton(layout: widget.layout)],
|
||||
),
|
||||
body: const TextField(key: appField),
|
||||
),
|
||||
@@ -125,6 +123,8 @@ Future<void> chord(
|
||||
}
|
||||
}
|
||||
|
||||
/// Alt+T: shows or hides the terminal from outside it (inside, it is the
|
||||
/// shell's ESC t).
|
||||
Future<void> altT(WidgetTester tester, {bool settle = true}) => chord(
|
||||
tester,
|
||||
LogicalKeyboardKey.keyT,
|
||||
@@ -132,6 +132,14 @@ Future<void> altT(WidgetTester tester, {bool settle = true}) => chord(
|
||||
settle: settle,
|
||||
);
|
||||
|
||||
/// Ctrl+`: shows or hides the terminal wherever the keyboard is.
|
||||
Future<void> toggleTerminal(WidgetTester tester, {bool settle = true}) => chord(
|
||||
tester,
|
||||
LogicalKeyboardKey.backquote,
|
||||
[LogicalKeyboardKey.controlLeft],
|
||||
settle: settle,
|
||||
);
|
||||
|
||||
Future<void> ctrlTab(WidgetTester tester, {bool reverse = false}) => chord(
|
||||
tester,
|
||||
LogicalKeyboardKey.tab,
|
||||
|
||||
Reference in New Issue
Block a user