Copy a terminal selection with Ctrl+C outside Apple platforms

A browser keeps Ctrl+Shift+C for its developer tools, so on Linux and
Windows web nothing copied. With text selected Ctrl+C now copies it (and
clears the selection) instead of interrupting the process; Ctrl+Insert
copies too, and a finished run's read-only output answers the copy keys.
The terminal's options menu names the key.
This commit is contained in:
2026-11-11 00:05:16 +00:00
parent e9fa1b6ec9
commit 2628f6c425
3 changed files with 170 additions and 2 deletions
@@ -77,5 +77,14 @@ class TerminalShortcutLabels {
String get summary => [
'Show or hide: ${toggle.join(', ')}',
if (tabs.isNotEmpty) 'Next or previous tab: ${tabs.join(' / ')}',
'Copy selected text: $copy',
].join('\n');
/// The keys that copy the terminal's selected text. A browser keeps
/// Ctrl+Shift+C for its developer tools.
String get copy => _apple
? 'Cmd+C'
: web
? 'Ctrl+C'
: 'Ctrl+C, Ctrl+Shift+C';
}