# Action A when holding key, action B when pressing once

**URL:** <https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855>\
**Category:** Configuration Help & General Discussion\
**Tags:** keyboard\
**Created:** [October 22, 2023, 1:12pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855 "2023-10-22T13:12:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![panosru](https://community.folivora.ai/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@panosru](https://community.folivora.ai/u/panosru)\
**Post date:** [October 22, 2023, 1:12pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855/1 "2023-10-22T13:12:10Z")

</div>

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:

```auto
    {
      "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!

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [October 22, 2023, 3:55pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855/2 "2023-10-22T15:55:58Z")

</div>

It should work when configured like described here:

> [@Keyboard shortcuts: configure different functionality for long or short presses](https://community.folivora.ai/t/keyboard-shortcuts-configure-different-functionality-for-long-or-short-presses/26873):
>
> You need at least BetterTouchTool version 3.766 to do this To setup a shortcut that triggers one function on short press, and another on long press do it like this: For Long Press: For Short Press:

Is there anything different in your config?

---

<div class="post-metadata">

**Author:** ![panosru](https://community.folivora.ai/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@panosru](https://community.folivora.ai/u/panosru)\
**Post date:** [October 22, 2023, 4:02pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855/3 "2023-10-22T16:02:50Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [October 22, 2023, 4:07pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855/4 "2023-10-22T16:07:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![panosru](https://community.folivora.ai/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@panosru](https://community.folivora.ai/u/panosru)\
**Post date:** [October 22, 2023, 4:12pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855/5 "2023-10-22T16:12:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andreas\_Hegenberg](https://community.folivora.ai/user_avatar/community.folivora.ai/andreas_hegenberg/32/39221_2.png) [@Andreas\_Hegenberg](https://community.folivora.ai/u/Andreas_Hegenberg)\
**Post date:** [October 22, 2023, 4:16pm UTC](https://community.folivora.ai/t/action-a-when-holding-key-action-b-when-pressing-once/33855/6 "2023-10-22T16:16:45Z")

</div>

great 👍😅
