Open Search with Alt slash shortcut

Accept the physical slash key for exact Alt+/ delivery, including macOS Option dead-key values, while preserving existing Ctrl+/ and Command+/ behavior. Add focused regression coverage and document the verified checks.
This commit is contained in:
2026-11-11 19:33:17 +00:00
parent 3da71c3053
commit aa8329460d
3 changed files with 53 additions and 4 deletions
+7 -4
View File
@@ -61,10 +61,13 @@ bool shellSearchShortcut(
TargetPlatform? platform,
}) =>
event is KeyDownEvent &&
event.logicalKey == LogicalKeyboardKey.slash &&
shellPrimaryModifier(keyboard, platform: platform) &&
!keyboard.isAltPressed &&
!keyboard.isShiftPressed;
!keyboard.isShiftPressed &&
(shellPrimaryModifier(keyboard, platform: platform)
? !keyboard.isAltPressed && event.logicalKey == LogicalKeyboardKey.slash
: keyboard.isAltPressed &&
!keyboard.isControlPressed &&
!keyboard.isMetaPressed &&
event.physicalKey == PhysicalKeyboardKey.slash);
const _digits = [
LogicalKeyboardKey.digit1,