Skip to content

fix: enable Globe+F (fn+F) fullscreen shortcut#507

Merged
datlechin merged 2 commits intomainfrom
fix/fullscreen-keyboard-shortcut
Mar 30, 2026
Merged

fix: enable Globe+F (fn+F) fullscreen shortcut#507
datlechin merged 2 commits intomainfrom
fix/fullscreen-keyboard-shortcut

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

  • SwiftUI lifecycle apps don't create a real NSMenuItem for "Enter Full Screen" — the fn F shortcut shown in the View menu is a visual hint only, with no key equivalent binding
  • macOS maps Globe+F (fn+F) to ⌃⌘F at the system level, but without a real menu item, the keystroke has no target
  • Install a local event monitor in AppDelegate that catches ⌃⌘F and calls toggleFullScreen(nil) on the key window

Investigation

  • Debug dump of View menu confirmed "Enter Full Screen" does not exist as a real NSMenuItem
  • Verified no existing code (VimKeyInterceptor, EditorEventRouter, InlineSuggestionManager) intercepts ⌃⌘F
  • Tested removing Toggle Filters (Cmd+F) shortcut — fn+F still didn't work, ruling out subset modifier matching
  • Tested explicitly setting .fullScreenPrimary on main windows — didn't trigger macOS to create a real menu item

Test plan

  • Press fn+F (Globe+F) → enters fullscreen
  • Press fn+F again → exits fullscreen
  • Verify Cmd+F still toggles filters
  • Verify Option+click green button still works
  • Verify View menu → "Enter Full Screen" click still works

SwiftUI lifecycle apps don't create a real NSMenuItem for "Enter Full Screen" —
the shortcut shown in the View menu is a visual hint only, with no key
equivalent binding. macOS maps Globe+F to ⌃⌘F, so install a local event
monitor to bridge the gap.
@datlechin datlechin merged commit 2d0e347 into main Mar 30, 2026
2 checks passed
@datlechin datlechin deleted the fix/fullscreen-keyboard-shortcut branch March 30, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant