help: making caps lock escape tapped, ctrl when held down

New BTT user here. I configure caps lock as escape when held down, control when corded using karabiner-elements. I'm trying out BTT as a replacement for it and some other apps I use.

How do I do this using BTT? It doesn't seem to want to map things to control directly.

Should I caps -> some-key using macOS settings and then try to configure some-key pressed-down behavior?

In karabiner this is achieved by complex modifications -

            "complex_modifications": {
                "parameters": {
                    "basic.simultaneous_threshold_milliseconds": 50,
                    "basic.to_delayed_action_delay_milliseconds": 500,
                    "basic.to_if_alone_timeout_milliseconds": 500,
                    "basic.to_if_held_down_threshold_milliseconds": 500,
                    "mouse_motion_to_scroll.speed": 100
                },
                "rules": [
                    {
                        "description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "caps_lock",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_control"
                                    }
                                ],
                                "to_if_alone": [
                                    {
                                        "key_code": "escape"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Map escape to caps_lock.",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "escape",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "caps_lock"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
            }

Unfortunately, I don't think you can do it exactly the same way with BTT.

What you can do is this.

In macOs remap caps lock to control. This turns caps lock into your physical right control key to trigger shortcuts: right control + x. BTT can distinguish between left and right modifiers.

Then set up a key sequence: right control = esc when tapped alone.

But note: esc is always executed when you use a shortcut with right control (caps lock) + letter.

I haven't tested it, but I'm almost sure it works like that. :slightly_smiling_face:

thanks for your reply. Bit of a bummer that I can't achieve the exact same behavior but I'll try your suggestions to see if I can get to something acceptable.

have a look at the advanced configuration part here Defining a Hyper Key · GitBook

However in general Karabiner is better for low level key remappings as it works on a lower level. There shouldn’t be a problem when using BTT and Karabiner together

//edit ah I missed the part where you want to map it to control. This won’t work with BTT (but Frank’s suggestion achieves the same)

I think it's the same behavior. :slightly_smiling_face:

It's even better than I thought. If you shorten the time for the key sequence (0.2s) esc is only executed if you tap right control shortly. So if you execute a shortcut with right control + letter, esc is not executed because the time between down and up is longer than 0.2s.