[GH-ISSUE #3317] [FR] Use platform native shortcut for settings #1466

Closed
opened 2026-03-23 20:49:37 +00:00 by mirror · 9 comments
Owner

Originally created by @intonarumori on GitHub (Sep 1, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3317

Description

macOS uses CMD + , to display the application menu.

Flutter provides shortcuts and PlatfromMenuBar to integrate with the shortcuts and menu systems.
Once you enable it the menu item will be active as well.

Screenshot 2023-09-01 at 14 39 23

Impact

All users familiar with system wide macOS shortcuts.

Additional Context

No response

Originally created by @intonarumori on GitHub (Sep 1, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/3317 ### Description macOS uses `CMD + ,` to display the application menu. Flutter provides shortcuts and [`PlatfromMenuBar`](https://api.flutter.dev/flutter/widgets/PlatformMenuBar-class.html) to integrate with the shortcuts and menu systems. Once you enable it the menu item will be active as well. <img width="323" alt="Screenshot 2023-09-01 at 14 39 23" src="https://github.com/AppFlowy-IO/AppFlowy/assets/86030/f7944175-19ef-42da-9cc8-b17bf9af6215"> ### Impact All users familiar with system wide macOS shortcuts. ### Additional Context _No response_
Author
Owner

@PalaniappanC commented on GitHub (Oct 2, 2023):

Hi @annieappflowy Can you assign this issue to my name.

<!-- gh-comment-id:1743521178 --> @PalaniappanC commented on GitHub (Oct 2, 2023): Hi @annieappflowy Can you assign this issue to my name.
Author
Owner

@Xazin commented on GitHub (Oct 2, 2023):

Hi @annieappflowy Can you assign this issue to my name.

I've assigned you, let me know if you need any assistance 👍

<!-- gh-comment-id:1743561299 --> @Xazin commented on GitHub (Oct 2, 2023): > Hi @annieappflowy Can you assign this issue to my name. I've assigned you, let me know if you need any assistance :+1:
Author
Owner

@PalaniappanC commented on GitHub (Oct 5, 2023):

Hi @Xazin @annieappflowy @MayurSMahajan @intonarumori Hope this is not possible in the current version of PlatformMenuBar provided by flutter as it does not have an option to list all the current menu items of the host (the MainMenu.xib items present now).
Due to this when I implement the custom logic with PlatformMenuBar all the previous Menu Items like Edit, Windows everything goes away.

Flutter Issue Reference : https://github.com/flutter/flutter/issues/133039
Discord thread link : https://discord.com/channels/903549834160635914/1159056176143663144

<!-- gh-comment-id:1747990722 --> @PalaniappanC commented on GitHub (Oct 5, 2023): Hi @Xazin @annieappflowy @MayurSMahajan @intonarumori Hope this is not possible in the current version of PlatformMenuBar provided by flutter as it does not have an option to list all the current menu items of the host (the MainMenu.xib items present now). Due to this when I implement the custom logic with PlatformMenuBar all the previous Menu Items like Edit, Windows everything goes away. Flutter Issue Reference : https://github.com/flutter/flutter/issues/133039 Discord thread link : https://discord.com/channels/903549834160635914/1159056176143663144
Author
Owner

@PalaniappanC commented on GitHub (Oct 6, 2023):

Hi @intonarumori we can't just assign the shortcut to settings using the PlatformMenuBar. We have to construct the entire mac os menu bar the appflowy has now. Shall I proceed with that

<!-- gh-comment-id:1750483889 --> @PalaniappanC commented on GitHub (Oct 6, 2023): Hi @intonarumori we can't just assign the shortcut to settings using the PlatformMenuBar. We have to construct the entire mac os menu bar the appflowy has now. Shall I proceed with that
Author
Owner

@intonarumori commented on GitHub (Oct 6, 2023):

@PalaniappanC Thanks for looking into this.

Please take a look at PlatformProvidedMenuItem to preserve some of the system provided items. You have to add them into your menu hierarchy and the library will make sure they will be added.

If something is still missing, then we probably have to file an issue on the Flutter Github repo.

I was even able to modify the native side to preserve the search functionality in the Help menu. There's an ongoing discussion about fixing that in Flutter here: https://github.com/flutter/flutter/issues/133039
And here's my experimental package demonstrating how it could be done: https://github.com/intonarumori/macos_menu

Let me know how it goes and I'm happy to assist.

Edit: And to answer your question, assembling the whole menubar is the way to go, with the above mentioned PlatformProvidedMenuItem added in places where the functionality should come from the system.

<!-- gh-comment-id:1751202246 --> @intonarumori commented on GitHub (Oct 6, 2023): @PalaniappanC Thanks for looking into this. Please take a look at [PlatformProvidedMenuItem](https://api.flutter.dev/flutter/widgets/PlatformProvidedMenuItem-class.html) to preserve some of the system provided items. You have to add them into your menu hierarchy and the library will make sure they will be added. If something is still missing, then we probably have to file an issue on the Flutter Github repo. I was even able to modify the native side to preserve the search functionality in the Help menu. There's an ongoing discussion about fixing that in Flutter here: https://github.com/flutter/flutter/issues/133039 And here's my experimental package demonstrating how it could be done: https://github.com/intonarumori/macos_menu Let me know how it goes and I'm happy to assist. Edit: And to answer your question, assembling the whole menubar is the way to go, with the above mentioned `PlatformProvidedMenuItem` added in places where the functionality should come from the system.
Author
Owner

@PalaniappanC commented on GitHub (Oct 7, 2023):

Sure @intonarumori. I can implement the whole menubar. But need some time hope its okay.

<!-- gh-comment-id:1751691974 --> @PalaniappanC commented on GitHub (Oct 7, 2023): Sure @intonarumori. I can implement the whole menubar. But need some time hope its okay.
Author
Owner

@annieappflowy commented on GitHub (Nov 5, 2023):

Would you like to work on this @PalaniappanC ?

<!-- gh-comment-id:1793749732 --> @annieappflowy commented on GitHub (Nov 5, 2023): Would you like to work on this @PalaniappanC ?
Author
Owner

@PalaniappanC commented on GitHub (Nov 5, 2023):

Hi @annieappflowy you can unassign me...

<!-- gh-comment-id:1793762783 --> @PalaniappanC commented on GitHub (Nov 5, 2023): Hi @annieappflowy you can unassign me...
Author
Owner

@annieappflowy commented on GitHub (Apr 1, 2024):

Supported cmd + , to open up Settings

<!-- gh-comment-id:2029362828 --> @annieappflowy commented on GitHub (Apr 1, 2024): Supported cmd + , to open up Settings
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#1466
No description provided.