[SOLVED] Preference to swap Ctrl/Cmd key on macOS

@ideasman42 @billrey about Cmd key support on Mac:

What if just add a keymap preset where the Cmd and Ctrl are swapped? Looks like a simple solution, no need to add more preferences options.

Moreover, there may be conflicts with the system hotkeys if just swap Ctrl/Cmd in preferences, therefore, a separate key preset looks more preferable.

1 Like

I’m not sure what advantage there would be in having a new preset compared to a preference.

Internally it would share the default keymap since it’s not practical to maintain two.

How would a preset avoid conflicts in a way that a preference wouldn’t?

Never mind, no additional presets needed,
swap Ctrl/Cmd preference will be great.

Just also need to add some extra hotkeys for Mac to replace/duplicate unavailable:

Cmd-M, Cmd-H
Cmd-Space, Alt-Cmd-Space
Ctrl-Space, Alt-Ctrl-Space

if you need to start changing arbitrary shortcut keys it becomes impractical, not keen on this.

It’s a problem that adding keys in the future may conflict on macos, depending on some non-default keymap preferences.

Currently we are already adding some shortcuts on Mac like Cmd-F, Cmd-comma, Cmd-Z…

Moreover now simultaneously used both Ctrl-F and Cmd-F, which does not allow just swap Ctrl/Cmd.

To be able to easily swap Ctrl/Cmd we need to change some shortcut, and do not use conflicting combinations. (For example, do not use Ctrl-space, maybe Ctrl-H too.)

The default action for Cmd-M (minimize window) can be disabled, not sure about Cmd-H.

We already use Ctrl-Space/H/M/Tab/~ … all of these conflict, probably others too.

Probably best someone using macos replies, as far as I can tell a solution here needs to be general enough that we don’t need to maintain a secondary keymap for macos.

We could have a preference that makes Blender see Cmd as Ctrl, for any keys that conflict you can always use the real Ctrl.

@ideasman42 @billrey

As I understand it, the Cmd-H / M / W etc. keys are assigned to application menu items here:
developer.blender.org/diffusion/B/browse/master/intern/ghost/intern/GHOST_SystemCocoa.mm$566
so it can be removed and these shortcut will become available for customization.

1 Like

Update: on macos, Cmd now doubles for Ctrl,
http://developer.blender.org/rB630e94791f62b2801c58f8745cb546906f9a6ef5

This is automated so we could still have some preference to do some other operation, however I’m not sure it’s needed.