Support fn+f as fullscreen shortcut on macOS
Categories
(Core :: Widget: Cocoa, enhancement)
Tracking
()
People
(Reporter: fwage73, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
Press fn (globe key) with f
Actual results:
It didn't go to fullscreen
Expected results:
Many macOS apps (including Chrome and Safari) can go fullscreen of this shortcut, Firefox doesn't support it yet
Reporter | ||
Updated•3 years ago
|
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Cocoa' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
This does not appear to be a default shortcut. Do you have a custom shortcut set in System Preferences > Keyboard > Shortcuts > App Shortcuts?
Reporter | ||
Comment 3•2 years ago
|
||
In newer models, the fn key is represented by '🌐' (the globe) in menus. Many applications (for example, Safari and default system mail, photos, notes) shows fullscreen toggle shortcut as '🌐F' in the display menuitem.
Comment 4•2 years ago
|
||
Thank you for the clarification. However, the post on stack exchange that you reference does not refer to this shortcut as being a default shortcut. It simply clarifies the meaning of the globe icon. The shortcut does not appear to be a default shortcut. Do you have a custom shortcut set in System Preferences > Keyboard > Shortcuts > App Shortcuts or similar?
Reporter | ||
Comment 5•2 years ago
|
||
I can confirm Fn-F isn't my personal setting. There're discussions about this in other community:
https://github.com/microsoft/vscode/issues/141323
https://www.reddit.com/r/MacOS/comments/rzgatq/enter_full_screen_shortcut_changed/
https://discussions.apple.com/thread/253599135
However, official Apple document still says Control-Command-F is fullscreen shortcut, Fn-F is not included there. The discussions show it begins in just Monterey.
Comment 6•2 years ago
|
||
We will definitely want to get some clarity around this shortcut. It does not appear to have changed for everyone, or every locale. It certainly hasn't changed for me on macOS Ventura in en-US.
Reporter | ||
Comment 7•2 years ago
|
||
Yes, many Apple's first-party applications have adopted this shortcut, but Apple hasn't documented it yet. Maybe we can leave this until official document has related changes.
Fn+F has been the primary shortcut for some time now. Apple is moving to Fn-based shortcuts for system-wide actions. Perhaps the hotkey shown in app menus depends on the keyboard one has. For me, the auto-added “Enter Full Screen” menu item consistently has Fn+F as its displayed shortcut in every app. Ctrl+Cmd+F also always works.
Generally, setting Fn as a key equivalent’s modifier is not permitted, but I just tested this, and it is possible for an app to set Fn+F as the hotkey as long as the action is toggleFullScreen:
. But this causes Cocoa to forcibly change the title of the menu item to (the local variety of) “Enter Full Screen”. So we’d get yet another of these language-incongruent cases when the user runs Firefox in a language different from that of the OS. But there are already several others, and there’s likely nothing that can be done about it as long as Firefox won’t declare its supported languages to the OS.
Hmm, it looks like hidden menu items created by the app itself do not respond to keyboard shortcuts. If this is really so, then perhaps the solution is to monitor for Fn+F separately (without a corresponding menu item) and leave Ctrl-Cmd-F in the menu. That would avoid the de-localization for mixed-language users. Which of the two hotkeys appears in the menu is fairly irrelevant.
Comment 10•10 months ago
|
||
(In reply to bintoro from comment #9)
Hmm, it looks like hidden menu items created by the app itself do not respond to keyboard shortcuts. If this is really so, then perhaps the solution is to monitor for Fn+F separately (without a corresponding menu item) and leave Ctrl-Cmd-F in the menu. That would avoid the de-localization for mixed-language users. Which of the two hotkeys appears in the menu is fairly irrelevant.
Hidden menu items can respond to keyboard shortcuts by setting allowsKeyEquivalentWhenHidden
to YES
.
Comment 11•10 months ago
|
||
(In reply to Stephen A Pohl [:spohl] from comment #10)
Hidden menu items can respond to keyboard shortcuts by setting
allowsKeyEquivalentWhenHidden
toYES
.
So it seems. Adding a hidden toggleFullScreen:
menu item with Fn+F works fine.
Alternatively, setting the action of the Ctrl+Cmd+F item to toggleFullScreen:
will automatically add the Fn+F shortcut as well (at least on a system where that is the norm). The Fn+F item (with its standard title) is the one visible in the menu, but both key combos work.
Description
•