flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
23.92k stars 1.52k forks source link

Mac OS: Show Cmd+Shift+X shortcut in the menu #3637

Open ilyagr opened 2 weeks ago

ilyagr commented 2 weeks ago

Feature Description

This is not a major thing, but I would find it very helpful if the Cmd+Shift+X shortcut for taking a screenshot (and possibly the shortcuts for the other operations in the menu) was shown in the application menu pictured below:

image
mmahmoudian commented 1 week ago

Do you have examples of other software that put their keyboard shortcuts in their tray icon menu?

One of the main reasons that it is not there for Flameshot is that these are Global Shortcuts. meaning when you press those keys, Flameshot will not capture those keys, but your operating system will capture them and then runs Flameshot. Therefore these are not keybindings "inside" Flameshot but rather bindings that triggers Flameshot.

ilyagr commented 1 week ago

Do you have examples of other software that put their keyboard shortcuts in their tray icon menu?

Sure, here's Maccy:

image

Here's Rectangle:

image

One of the main reasons that it is not there for Flameshot is that these are Global Shortcuts. meaning when you press those keys, Flameshot will not capture those keys, but your operating system will capture them and then runs Flameshot. Therefore these are not keybindings "inside" Flameshot but rather bindings that triggers Flameshot.

This is also the case for both programs above, I think.

mmahmoudian commented 1 week ago

Thanks for the examples, but these two doesn't count. They both are always running in the background and providing their services (tiling management and clipboard management), and therefore both should have "global" key bindings. Flameshot on the other hand doesn't listen to anything unless it is explicitly called by the user. This means the only "global" binding is the one to trigger flameshot gui (and all the other keybindings you yourself define. More info about CLI here).

Maybe, maybe the screenshot one can be added, but then, that is the only thing that makes sense to me.

I will keep this feature open, to see what the community thinks and if there us any solid interest. But in my humble personal opinion: I would very much like to keep the UI/UX similar in all platforms and don't write special features for special operating systems.

ilyagr commented 1 week ago

Thanks for the examples, but these two doesn't count. They both are always running in the background and providing their services (tiling management and clipboard management), and therefore both should have "global" key bindings. Flameshot on the other hand doesn't listen to anything unless it is explicitly called by the user.

On second thought and after some testing, I agree that Maccy wasn't exactly what you asked for, if viewed through the lens of global shortcuts. The shortcuts it lists are only valid if Maccy is open. It does have a global shortcut to open that window, but it's not listed inside the window.

The Rectangle example, OTOH, is completely analogous to Flameshot's "Take Screenshot" and "Open GUI" commands. It sits in the background doing nothing and then, if you press one of its shortcuts, it activates and does its thing (e.g. tiles the current window and puts it in some screen quadrant).

The shortcuts are not completely global; all three of Maccy, Rectangle, and Flameshot's shortcuts do not work if the app wasn't previously launched and isn't in the tray, either by the user or on startup. (I think some Mac OS apps do manage to hide from the tray and still work, but they are exceptions to the rule. Alt-Tab is one).

I'm not sure whether it's important how global a shortcut is when deciding whether to label it, but I feel like my examples are pretty useful as context to think about it. :)

Maybe, maybe the screenshot one can be added, but then, that is the only thing that makes sense to me.

I agree that "Take Screenshot" feels like the most important command to label. Most other Flameshot shortcuts are nicely documented with tool-tips after the screenshotting UI opens. "Open Launcher" seems to me to be an analogous command to "Take Screenshot", so I'd label it as well, but it's less important in terms of practical utility.

I would very much like to keep the UI/UX similar in all platforms and don't write special features for special operating systems.

I would not mind at all if the keyboard shortcuts were advertised on all platforms. I haven't used Flameshot on Windows or Linux, but I assume it would mean listing the keyboard shortcuts in the tray icon menu.

mmahmoudian commented 1 week ago

"Open Launcher" seems to me to be an analogous command to "Take Screenshot", so I'd label it as well, but it's less important in terms of practical utility.

We do not have a shortcut for opening the launcher. Although on Linux and macOS, users can assign any keybinding to flameshot launcher (same way that they can have a binding for flameshot gui or even flameshot gui --accept-on-select --pin). and Flameshot has not universal way to know which binding is set to what to display that on the context menu of the tray icon.

I haven't used Flameshot on Windows or Linux, but I assume it would mean listing the keyboard shortcuts in the tray icon menu.

Yes, and I'm not sure how possible that is in other platforms. But I'm not against it if there can be a universal way to show the bindings to the user.

Regardless, I will keep this feature request open as I can see some merits in it, although I'm not very clear about the implementation challenges.

Thanks for sharing your idea.

mmahmoudian commented 1 week ago

Do you mind if we change the title to something like "Show keyboard shortcut in the tray icon menu"? In that case we can also aim for cross-platform support of such feature with the same issue.