Add unified keyboard shortcut help

Expose platform-aware shortcut help from Settings, keep narrow layouts scrollable, share Search tooltip labels, and document Terminal-to-chat composer focus. Integrate together with the separately reviewed Alt-slash handler.
This commit is contained in:
2026-11-11 20:05:56 +00:00
parent a38f1bb3d1
commit 21115f8e8f
10 changed files with 363 additions and 1 deletions
+2 -1
View File
@@ -10,6 +10,7 @@ import 'list_detail.dart';
import 'list_pane_widths.dart';
import 'shell_bar.dart';
import 'shell_list_shortcuts.dart';
import 'shell_search_shortcut_labels.dart';
import 'tab_history.dart';
import '../ui/input/keyboard_owner.dart';
@@ -383,7 +384,7 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
IconButton(
key: const ValueKey('shell.search'),
onPressed: onSearch,
tooltip: 'Search',
tooltip: 'Search (${shellSearchShortcutLabels().join(', ')})',
icon: const Icon(Icons.search),
),
...widget.barActions,
@@ -0,0 +1,12 @@
import 'package:flutter/foundation.dart';
/// Search chords supported by the shell, independent of theme overrides.
List<String> shellSearchShortcutLabels([TargetPlatform? platform]) {
final target = platform ?? defaultTargetPlatform;
final apple = target == TargetPlatform.macOS || target == TargetPlatform.iOS;
return [
apple ? 'Option+/' : 'Alt+/',
if (target == TargetPlatform.macOS) 'Cmd+/',
'Ctrl+/',
];
}