Right Command to a specific combination of keys

If you hold down ctrl+option in Photoshop, you can adjust brush size or hardness by clicking and dragging with the left mouse button simultaneously. He wants to replace the function of the ctrl+option keys with the right CMD key.

1 Like

Yes, SLE, exactly. :slight_smile:

I unfortunately do not have Photoshop

Yes, but I'm afraid it does not work with right cmd. It works with right opt, at least here in other apps.

I don't think the desired functionality can be mapped with BTT in this form. But I would have liked to be corrected. :wink:

1 Like

Maybe I underestimate my stupidity :innocent:

Short search. From my understanding, it's the same problem. Without a real solution.

1 Like

Maybe I underestimate my stupidity :innocent:

Nah, you're always very helpful. It's just I often need strange things. :slight_smile:

Maybe we could suggest a way to accept only modifiers as shortcut, and also a way to send multiple modifiers as an action. :slight_smile:
Many thanks for your help, @Frank1 and @SLE.

If I remember correctly, Andreas once indicated he wanted to implement this.

Couldn't the press and release of modifiers be done with an Apple script?

The main problem is, modifier keys behave differently than normal keys - and BTT can not block them.
So if you assign the "opt key down" and "ctrl key down" actions to "right cmd down" (can be done in key sequences) you will end up with cmd + opt + ctrl, which I just learned is a color picker in Photoshop :slight_smile:

Therefore for such things you should use a dedicated key remapping tool that works on a lower level (e.g. Karabiner Elements).

If you want to achieve what is described here with BTT, you can do it like this:

1.) Remap the right cmd key to some normal key, which you don't usually use. In this example right cmd becomes f19. Use this terminal command for this:

/usr/bin/hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x7000000E7,"HIDKeyboardModifierMappingDst":0x70000006E}]}'

2.) Now when you press right-cmd you can record it as a normal shortcut and it will show up as F19 in BTT. So you can configure one action set for F19 - down and one for F19 up. Use the predefined actions "opt key down" "ctrl key down"

However the terminal command in step 1 needs to be executed everytime BTT starts. You can do this with the "After BetterTouchTool Did Launch" trigger in the "Automations, Named & Other Triggers" section:

But what if you use "right opt" instead of "right cmd" and with that only "ctrl up/down" is triggered?

Then "opt" should be triggered by the physical key and "ctrl" by the action, or not?

yes, that would work

Just quickly tested that and can confirm it works in photoshop.


Recording the key sequences for only opt-down and only opt up is a bit tricky, but possible using the "stop recording" and "clear" button.

Good, because that's what I suggested above. :slightly_smiling_face:

And that should also work in Photoshop while clicking and dragging with the mouse. Right?

yep I just tested with Photoshop, works fine here :slight_smile:

Nice :smiley: In this particular case I have correctly assessed my stupidity.

@Lock If you can live with "right opt" (instead of "right cmd") then you have a solution :smiley:

Thanks for your help Andreas. I need to learn about Key Sequences as, so far, I only used Keyboard Shortcut.
Doing some blind test I somehow jammed the ctrl function so I only had the right click on my mouse, and I wasn't able to do anything (even close the btt process). :smiley:

yep you need to be careful to always add a trigger that does the corresponding key up event - otherwise the key will stay pressed indefinitely :wink:

Ah ah, I just noticed. :slight_smile:

Anyway I think I was able to make it work this way:

image

And using Option key. But I have to find a way to only use the right one, as for now it uses both. Since in your example you was able to use the R one, I've just to find it. :slight_smile:

In Keyboard Shortcut there's a "Differentiate left/right modification keys" but in Key Sequences there's not that option.

does it not automatically add the "r" for you if you record it using the right opt key? What kind of keyboard do you use? (some do not differentiate between left and right)

1 Like

I use an Epomaker TH80 (*THOCK THOCK THOCK* /1 — 🇺🇦 there's a "translate" button on the bottom left corner of the page).

Hmmm... It seems it sends the same command regardless of what key I press (so my previous statement about "Differentiate left/right modification keys" is not valid, I never realized).

I've just had a look inside it's driver (it's an app to remap keys and other stuff) and I just realized that originally it was a Command key. I've changed it to Option as I use it more often on the right side of my keyboard (TH80 doesn't have two modifiers, as it's a 75% keyboard). But, unfortunately, I can't force it to a "right Option", just a general "Option".
If I reset the button back to Command, BTT can detect that it's a "right Command".

So I guess there's nothing I can do about it (unless remap the key to another key, but I'll loose the Option in all other apps).

Anyway many thanks Andreas, as usual. :slight_smile:

hmmm... unless I remap it to like F19 and force it to an alt everywhere and to CTRL+ALT in Photoshop.
Let's try...