1

I'm not familiar with macOS at all. Nevertheless, when designing cross-platform software features, one needs to be aware of such small differences. I've seen a lot of keybindings which are usually Ctrl+ (something) on Windows and Linux and Cmd+(something) on Mac.

For some standard actions (e.g. copy, save, etc.) you can easily find information on what the expected shortcut should be. However, when it's a software-specific action that's not so simple, especially if your software is some sort of plugin or component of a larger third-party program.
One can easily assume that Ctrl is equivalent to Cmd works as a general guideline, but does it really?

General question

When does this apply? When can I simply assume macKey = otherOsKey.replace('Ctrl+', 'Cmd+')?
For what keys or combinations? Or for what kind of actions?
I'm asking more in terms of good practice guidelines rather than an exhaustive list.

What I read about it makes it seem like ⌘ (Cmd) is similar to the WinKey, which I would think of as an OS-defined action that I'd probably want to avoid clashing with. E.g. maybe it makes sense for cross-app standard stuff like copy, save, etc. but not for some very specific action in my software?

Specific question

I want this particular feature to be on Ctrl+F1 on Windows and Linux.
Can I just use Cmd+F1 or should I expect it to clash with OS keybindings or a different expected behavior (because it's F1-F12 instead of a letter)? Should I use something else for specific actions of my app? This particular action would be a sort of "open documentation" action; but I'd like to also know what I should do in general.

5
  • 1
    I think in most cases app shortcuts, especially those still active when a textarea/field is focused, should always be prefixed with cmd, optionally with shift and/or ctrl. Ctrl and option shortcuts in macOS textareas are mostly used for text editing and cursor movements. This is especially true when the user has a custom DefaultKeyBinding.dict. You should not override them. Commented May 30, 2024 at 4:22
  • 2
    The best guide is Apple's Interface Guidelines - for keys see developer.apple.com/design/human-interface-guidelines/keyboards Commented May 30, 2024 at 7:57
  • 1
    I find cmnd and ctrl do different things: cmnd+shift +; is a shortcut for time, while changing to control gives the date... Commented May 30, 2024 at 11:25
  • 1
    I would avoid the F-Keys, because many users have them set to be used as 'system' keys, for volume, brightness etc & may not immediately realise that they will have to use Fn/Cmd/F-key to invoke the 'true' F-key. Commented May 30, 2024 at 12:00
  • Thanks! This is on VSCode btw. I believe I'll end up using ⌥⌘D. I also considered alternatives like ⇧⌘/ (i.e. ? as in "help") but it seems to clash and ⌥⇧⌘/ seems too complicated. On Windows/Linux F1 is often used for "help"-related commands, so I'd rather use ⌥F1 if possible, assuming macOS had this convention too (does it?), but if it can be a bad idea, maybe not. Commented Jun 4, 2024 at 22:14

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.