Action A when holding key, action B when pressing once

Hi, I'm a long-time user of Karabiner Elements I'm trying BTT now to avoid writing JSON code every time I need to have a modifier.

I'm trying to emulate this:

    {
      "description": "Dictation / Siri [F14]",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key_code": "f14"
          },
          "to_if_alone": [
            {
              "repeat": false,
              "consumer_key_code": "dictation"
            }
          ],
          "to_if_held_down": [
            {
              "repeat": false,
              "key_code": "f16"
            }
          ]
        }
      ]
    }

Essentially, what this does is if I press F14 once, then it acts as dictation, but, if I press and hold, then it acts as F16. F16 is mapped to Siri, in that way, I can switch between dictation and Siri by either holding or not F14.

In BTT I created a keyboard shortcut for F14, and set the minimum hold time to 1s, and added F16 in actions. That works great for Siri, but now the default F14 key is not working when I try to map it to dictation from Apple keyboard settings. If I create a second shortcut for F14 on key-up, it cancels the previous shortcut for F14 with the hold option.

Any suggestions would be greatly appreciated!

Thanks!

It should work when configured like described here:

Is there anything different in your config?

1 Like

Ah! I was searching in the forums and couldn't find that (most likely I wasn't using proper keywords). The key was the "Maximum time keys can be pressed" option which I had not set on Key Up for F14 default action!

Thanks a lot!

awesome! Just note: Karabiner is more powerful when it comes to keyboard customization. It works on a much lower level which is why it can do more things than BTT.

So you might run into things you can’t replicate in BTT.

1 Like

Yes, I understand that that's why I replicated all my customisations to make sure that at least for what I need it for, BTT can cover me, and by solving that last issue, I can now wait for your black Friday promo to buy the app hehe

great :+1::sweat_smile: