Single key trigger prevents default action

Hello,

I am trying to setup: type an “ä” instead of a on long press.
My idea was to: let the default action type a and then trigger on longpress an apple script that deletes the previous character and types “ä”. The latter works (after giving accesibility permissions to the script editor in the system settings).

However the trigger on “a” with minimum holding time = 0.2 seconds prevents the default action (typing “a”) from being triggered.

How to let the default action come through?

I tried setting another trigger on a with no minimum holding time and “type custom text” “a”.
But it does not work.

Thank you

you'd need to configure the short press to basically forward the key:

@Frank1 has a lot of knowledge on how to configure that, maybe he can help :slight_smile:

However I think this always comes with some limitations (the problem is that by default letters are always typed on initial key press-down, so any modifications to that will impact the typing behavior)

Thanks, in case @Frank1 reads this, I searched a bit and it seems there is a solution I am not fond of which is:
E.g. typing a on keydown immediately and “ä” on keyup when a certain duration is reached.
Id like to have “ä” on keydown when a certain duration is reached, not on keyup, because its a bit awkward.

ä is clear, but when would you type a (if you type ä after a defined amount of time a would have already been typed with the macOS default behavior, so you'd end up wit aä)

well thats what i want and is not working:
”I want the default action to trigger despite having a listener on keydown+minimumduration.”

I want a to be typed immediately, just the default behavior of the a key.
Then i have a trigger on long press which will delete the previous character( the a) and insert an ä.

In that case configure it like this (copy & paste into BTT) - you might need the current BTT alpha for this due to Bug?? Minimum time key down - #17 by Frank1

[
  {
    "BTTLastUpdatedAt" : 1759396270.0761518,
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTUUID" : "198696AE-1FFF-4359-BE99-CBEEA55D679E",
    "BTTAdditionalConfiguration" : "0",
    "BTTShortcutScope" : 0,
    "BTTShortcutKeyboardType" : -2052004921,
    "BTTTriggerOnDown" : 1,
    "BTTLayoutIndependentChar" : "a",
    "BTTShortcutKeyCode" : 0,
    "BTTShortcutAdvancedModifierKeys" : "0",
    "BTTShortcutModifierKeys" : 0,
    "BTTOrder" : 28,
    "BTTAutoAdaptToKeyboardLayout" : 0,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1759396268.3165321,
        "BTTTriggerParentUUID" : "198696AE-1FFF-4359-BE99-CBEEA55D679E",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
        "BTTUUID" : "FFB50BBD-DEB7-455D-92BB-33604EDE0399",
        "BTTLayoutIndependentActionChar" : "a",
        "BTTShortcutToSend" : "0",
        "BTTShortcutKeyboardType" : 0,
        "BTTShortcutKeyCode" : -1,
        "BTTOrder" : 111,
        "BTTAutoAdaptToKeyboardLayout" : 0
      }
    ],
    "BTTTriggerConfig" : {
      "BTTKeyboardPreventRecursiveTriggers" : 1
    }
  },
  {
    "BTTLastUpdatedAt" : 1759396308.756012,
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTUUID" : "94C22740-6726-4216-8943-FE12EC15C10A",
    "BTTAdditionalConfiguration" : "0",
    "BTTShortcutScope" : 0,
    "BTTShortcutKeyboardType" : -2052004921,
    "BTTTriggerOnDown" : 1,
    "BTTLayoutIndependentChar" : "a",
    "BTTShortcutKeyCode" : 0,
    "BTTShortcutAdvancedModifierKeys" : "0",
    "BTTShortcutModifierKeys" : 0,
    "BTTOrder" : 29,
    "BTTAutoAdaptToKeyboardLayout" : 0,
    "BTTActionsToExecute" : [
      {
        "BTTLastUpdatedAt" : 1759396283.8747768,
        "BTTTriggerParentUUID" : "94C22740-6726-4216-8943-FE12EC15C10A",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
        "BTTUUID" : "90D753EB-09B1-457F-A8BA-524CC98C013F",
        "BTTLayoutIndependentActionChar" : "ä",
        "BTTShortcutToSend" : "39",
        "BTTShortcutKeyboardType" : 0,
        "BTTShortcutKeyCode" : -1,
        "BTTOrder" : 112,
        "BTTAutoAdaptToKeyboardLayout" : 0
      }
    ],
    "BTTTriggerConfig" : {
      "BTTKeyboardShortcutMinTime" : 0.40000000596046448
    }
  }
]

People usually say: "This is not rocket science." Well, this actually is rocket science, because there are many different ways to set it up. It's about deciding which disadvantages you're willing to accept in order to gain certain advantages. I'm not at my computer right now, but if you'd like, I can explain it in more detail later :slight_smile:

I would appreciate that

i tested this in non-alpha as I also have no clue where to get that.
But I face two issues:

  1. after longer press I get this overlay asking 1 or 2:

  1. Pressing the “a” key should immediately trigger the typing of “a”, but instead only the above overlay appears after a longer press.

Yes that's what is resolved in the alpha

(alternatively All current and previous BetterTouchTool releases for download)

Thanks for your help, its working

@Mx142 So now you have two actions that are executed when a key is pressed, right? The second action types a letter (which you don't want) and is therefore deleted.

This is not a problem in a text field. But what about in a non-text field? I've never experienced this myself, but there are stories about such actions causing completely unpredictable things to happen, depending on the app. Deletion in particular is said to be a problem.

To reduce the risk, BTT offers the option of allowing certain actions only in text fields. In a non-text field, the first action would do nothing and the second action could trigger something without anything having to be deleted. It's hard to say whether this is necessary, but that's how I do it.

Thank you, I may look into that, though its just pretty unlikely to create something unexpected, because just by nature of the task I don’t use it very often. ä ö ü ß are the ones i got mapped to a o u and s and respective captial ones to their equvialents. but only use them when the german language requires it.

Verstehe, hast du erwogen, das Standard Setup zu wählen? Also, "a" wird beim Loslassen der Taste getippt und "ä" beim längeren Drücken der Taste. Mit diesem Setup muss nichts gelöscht werden.

Das wäre eigentlich die bessere Lösung. Ausser du kannst schnell schreiben. Dann würde aus den Wort "am" das Nichtwort "ma".

Leider finde ich so ein “on keyup” für einen Standardbuchstaben etwas unangenehm. Da toleriere ich lieber den Delete.
Auch beim Programmieren ist es etwas komisch, wenn man a = … schreibt und a wird erst on keyup geschrieben.

Danke trotzdem für den Tipp