21115f8e8f
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.
13 lines
433 B
Dart
13 lines
433 B
Dart
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+/',
|
|
];
|
|
}
|