Can BTT map “Right Option” or “Right Command” ?

I’ve just switched from Karabiner to BTT for my “Hyperkey” needs because I think Karabiner was causing issues on my M1 MacBook Air and want to get away from kernel extensions as much as possible.

The only downside is that Karabiner’s Hyperkey functionality actually did two things:

  1. Press + Hold = Command+Option+Control+Shift
  2. Press + Release = F19

I mapped “F19” to my keyboard shortcut for Alfred, so if I just tapped the Caps Lock key, I would get Alfred, but if I held down the Caps Lock key, I would get the “Hyper Key”.

I don't think that BTT can do both of those, and if not, that's OK.

However, it did lead me to wonder if I could remap the right Option key or the right Command key to F19 using BTT.

The hyper key functionality you want is possible with the latest alpha, see THANK YOU for Capslock -> Hyper! A small request... - #4 by Andreas_Hegenberg

You could assign actions to right modifier keys, however BTT can not block these key from going through to the system, which in your case should not be relevant. However this is only possible by defining a key sequence with the modifier:
image

Amazing! Thank you! It took me a bit to figure it out but I have it working now.

The other is less important now that this is working.

Considering apps like RCMD and LaunchPalette are becoming more popular which can configure all sorts of shortcuts to Rcmd/Roption/Rcontrol; is there a reason why regular shortcuts cannot be configured to Rcmd/Roption/Rcontrol, or are other devs effectively limited to doing it the same way key sequences achieve it in BTT, but they are just making it look like a shortcut in their GUI?

yes other apps are limited to the same - however for modifier keys it usually doesn't matter that they still "reach" the system and are not blocked like other shortcuts.

Is there anything you can't achieve with the BTT key sequences?

Yeah, so LaunchPalette 100% suppresses conflicts and prioritizes app switching/launching.

So for example, if I have Firefox open, and I hit RCMD+D, it launches or switches to devonthink perfectly. But BTT isn't doing it the same way it seems, because Firefox will commonly try to create a bookmark, and then switch to Devonthink, or I have to try a couple times to get it to trigger. It's not as instant, and feels really buggy when comparing the two.

I'd certainly prefer just using BTT only though.

Edit: Also, when tapping the shortcut a second time, LaunchPallete toggles back to the previous window. I like this.

oh for rcmd+D you wouldn't use a key sequence. That is a normal shortcut in BTT, you just have to check this box:

Key sequences are only relevant if you want to trigger stuff by ONLY pressing modifier keys

Ah, that's certainly easier, thanks!

I still have firefox trying to save a bookmark, however, since that is the default function of CMD+D. Is there a way to have BTT suppress right modifier shortcuts conflicts like RCMD/LaunchPalette do?

Is there a way to have an if-logic so that if the app is already in the foreground, it toggles back to the previous app? (see prior comment edit).

is secure input maybe enabled on your system for some reason? By default BTT should block the default just fine when using shortcuts instead of key sequences, but it can't do that when secure input mode is active (BTT will tell you about this when clicking the BTT menubar icon)

An if condition should work fine, you can use the "activate previous app" action:

Hmm, nope. Looks like secure input is not activated, but I quit and re-started BTT, disabled and re-enabled the shortcut, and that seems to have solved it for now.

The if condition caused a conflict for having two commands on the same shortcut, so I created an if firefox is not active condition, and now I just have two conflicts pop open as a dialogue. The if logic seems to be preceded by the shortcut selection dialogue. Is there a way to change that?

Can you explain why you need two times the same shortcut? Depending on the usecase there are different ways this needs to be configured

Yeah, so I'd like to hit rCMD+F to pop open firefox when needed, and if I'm only glancing at something briefly, hit rCMD+F again to toggle back to the prior app. Sure, I could just cmd+tab back, but if my hands are already on the two keys, it's a bit quicker to just quickly window switch back like LaunchPallete does it. The same scenario would apply to all apps I trigger with rCMD.

The easiest is to do it like in the example I posted, just add "Activate Previous App" to your "else" branch - then you don't need to configure the shortcut twice.

Ah, that was my neglect to copy the logic exactly, thanks!

Last thing:
If I have rCMD+D set to devonthink, and rCMD+D+A sequence set to DevonthinkAgent, is there a way so that when I hit rCMD+D+A, BTT doesn't first trigger rCMD+D?
The shortcut seems to jump the gun and take priority over the sequence, without waiting for the sequence to complete.

That would be complicated. Shortcuts always execute immediately and macOS doesn't have any support for multi letter shortcuts.

It can be done but it's quite advanced and complicated, also in that case you'd indeed need to use key sequences. It would require usage of the "start blocking keyboard input" action once right cmd is pressed and "end blocking keyboard input" once right-cmd is released.
This can then be combined with a conditional activation group that is only active while keyboard input is being blocked. Additionally the "d" key sequence would need to be configured to only trigger if no other keypress is detected for a while.



Yeah, probably not worth it then, since the "d" sequence would have to wait for no further key detection, causing a delay. Pity I can't just set shortcuts to wait for "trigger on modifier up," rather than wait for "trigger on key up."

Thanks for the help.

P.s., in dark mode, the text color for this function defaults to white on white:
Screenshot 2024-01-04 at 11-30-59 AM