Sending keyboard shortcuts under multiple input methods - Bug or by design

Hi
I've noticed something rather annoying with BTT.
Whenever triggering a keyboard shortcut when the current language is not english, BTT will attempt to send it using the current keyboard layout which obviously won't work. Only remedy is to change the layout back to english and retry.
I've also noticed that when opening the GUI when the language is not english, the GUI would display the current language's equivalent.
I don't see the use of it and was wondering if there is, and if not is there a way to force the trigger to be consistent with the initial setting?

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Keyboard

Screenshots


Device information:

  • Type of Mac:MBP 2015
  • macOS version: High Sierra 10.13.6
  • BetterTouchTool version: 3.2.06

Unfortunately that's due the way the macOS standard key handling api's work by default (they give the physical location of the key, not the character <> key mapping.

You can try the "auto adapt" option to workaround this, then BTT will try to send the shortcuts based on the character.

Thanks for the quick reply :slight_smile:
I've tried playing with the auto adapt option which helps with triggers initiated using a keyboard shortcut, But when sending a keyboard shortcut action using a trackpad gesture, ticking/unticking this option doesn't seem to help...

Mh, it should! Maybe some sort of bug.
Could you post an example that doesn't work? (Just select the trigger in BTT, cmd+c and then paste it here in the forum)

Sure :slight_smile:
Huh , that's odd, as I was pasting the trigger I noticed that in the displayed paste the BTTLayoutIndependentActionChar was with non english char, so I tried to set it again and still when pasted it displayed 'ר instead of r, only deleting the gesture completely and recreating help for this and other similiar gestures with the auto adjust layout unset..although I'm quite sure it was setup with english as the active keyboard
But there still one trigger that doesn't work, here it is..
[
{
"BTTTriggerType" : 103,
"BTTTriggerTypeDescription" : "3 Finger Swipe Down",
"BTTTriggerClass" : "BTTTriggerTypeTouchpadAll",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTLayoutIndependentActionChar" : "a",
"BTTAutoAdaptActionToKeyboardLayout" : true,
"BTTShortcutToSend" : "0",
"BTTEnabled2" : 1,
"BTTAlternateModifierKeys" : 0,
"BTTUUID" : "738380B6-FD47-4ACB-BDDA-5DFF77445602",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 5,
"BTTDisplayOrder" : 0,
"BTTAdditionalActions" : [
{
"BTTTriggerType" : -1,
"BTTTriggerClass" : "BTTTriggerTypeTouchpadAll",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTLayoutIndependentActionChar" : "a",
"BTTAutoAdaptActionToKeyboardLayout" : true,
"BTTShortcutToSend" : "0",
"BTTEnabled2" : 1,
"BTTAlternateModifierKeys" : 0,
"BTTUUID" : "C1DFA58D-0AD3-4EE7-B4A6-EEEEE9C3F6EC",
"BTTNotesInsteadOfDescription" : 0,
"BTTEnabled" : 1,
"BTTModifierMode" : 0,
"BTTOrder" : 36,
"BTTDisplayOrder" : 0
}
]
}
]

note Might be a side bug but you might notice that the trigger sends the letter A two times, which is because for some reason when setting an action that just sends "A", BTT won't display the action and won't send it unless I set it to send another "A". That's weird because it only happens with the letter A. (see video)
18
Edit: NM, cannot upload the video and the bug isn't related (I think) but if you want, just try to set a trigger that sends "A"
Edit2: Here's a link to the video https://imgur.com/a/zZ94YwH

I also noticed that BTTAutoAdaptActionToKeyboardLayout is pasted as true weather or not it is set in the GUI. In the trigger pasted above it is unset in the GUI

Whoops, Bump ?
I've tested a few of the triggers on the terminal to see what it outputs and it's definitely outputs the current active keyboard chars, instead english regardless of the Auto adapt option...

Sorry I'll need a few days to look into this, but it's on my list!

I'm experiencing a similar issue where my keyboard shortcut visually changes from "cmd + /" to "cmd + -" in the GUI when I switch keyboard layouts, although the configuration remains correct with "BTTLayoutIndependentActionChar": "/" .

I registered the shortcut with the USA keyboard and have enabled "Auto adapt to current keyboard layout.".

The result is that the shortcut does not work on my Norwegian keyboard, which is where I need it :slight_smile:

Here's the code snippet demonstrating my setup:
[
{
"BTTLastUpdatedAt" : 1711095777.4761119,
"BTTTriggerType" : 0,
"BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
"BTTUUID" : "D76278F5-B876-4007-9AD3-8924627BB5D9",
"BTTPredefinedActionType" : 366,
"BTTPredefinedActionName" : "Empty Placeholder",
"BTTAdditionalConfiguration" : "1048584",
"BTTKeyboardShortcutScope" : 0,
"BTTKeyboardShortcutKeyboardType" : 1213,
"BTTTriggerOnDown" : 1,
"BTTLayoutIndependentChar" : "/",
"BTTEnabled" : 1,
"BTTEnabled2" : 1,
"BTTShortcutKeyCode" : 75,
"BTTShortcutModifierKeys" : 1048576,
"BTTOrder" : 1,
"BTTAutoAdaptToKeyboardLayout" : 1,
"BTTAdditionalActions" : [
{
"BTTLastUpdatedAt" : 1711095661.9499359,
"BTTTriggerType" : -1,
"BTTTriggerParentUUID" : "D76278F5-B876-4007-9AD3-8924627BB5D9",
"BTTIsPureAction" : true,
"BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
"BTTUUID" : "792E0191-8F52-4E0C-BB92-EBD5021476F5",
"BTTLayoutIndependentActionChar" : "/",
"BTTAutoAdaptActionToKeyboardLayout" : true,
"BTTGenericActionConfig" : "autoAdapt",
"BTTShortcutToSend" : "55,44",
"BTTKeyboardShortcutKeyboardType" : 0,
"BTTEnabled" : 1,
"BTTEnabled2" : 1,
"BTTShortcutKeyCode" : -1,
"BTTShortcutModifierKeys" : -1,
"BTTOrder" : 0,
"BTTAutoAdaptToKeyboardLayout" : 0
}
],
"BTTTriggerConfig" : {
"BTTKeyboardPreventRecursiveTriggers" : 1
}
}
]

I tried using the change input source action as well, but it's not able to revert back to Norwegian layout.

[
{
"BTTLastUpdatedAt" : 1711096993.879745,
"BTTTriggerType" : 0,
"BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
"BTTUUID" : "3ABDE8E5-1A6D-4DA1-BB4A-F4DBD02E9C51",
"BTTPredefinedActionType" : 366,
"BTTPredefinedActionName" : "Empty Placeholder",
"BTTAdditionalConfiguration" : "1048584",
"BTTKeyboardShortcutScope" : 0,
"BTTKeyboardShortcutKeyboardType" : 1213,
"BTTTriggerOnDown" : 1,
"BTTLayoutIndependentChar" : "/",
"BTTEnabled" : 1,
"BTTEnabled2" : 1,
"BTTShortcutKeyCode" : 75,
"BTTShortcutModifierKeys" : 1048576,
"BTTOrder" : 2,
"BTTAutoAdaptToKeyboardLayout" : 1,
"BTTAdditionalActions" : [
{
"BTTLastUpdatedAt" : 1711096781.6386809,
"BTTTriggerType" : -1,
"BTTTriggerParentUUID" : "3ABDE8E5-1A6D-4DA1-BB4A-F4DBD02E9C51",
"BTTIsPureAction" : true,
"BTTUUID" : "59853907-A409-4701-9488-40B14DA88E40",
"BTTPredefinedActionType" : 420,
"BTTPredefinedActionName" : "Change Input Source / Keyboard Layout",
"BTTAdditionalActionData" : {
"BTTActionChangeInputSource" : "U.S."
},
"BTTGenericActionConfig" : "U.S.",
"BTTEnabled" : 1,
"BTTEnabled2" : 1,
"BTTOrder" : 0
},
{
"BTTLastUpdatedAt" : 1711096781.638674,
"BTTTriggerType" : -1,
"BTTTriggerParentUUID" : "3ABDE8E5-1A6D-4DA1-BB4A-F4DBD02E9C51",
"BTTIsPureAction" : true,
"BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
"BTTUUID" : "D772AE71-7426-4545-B794-CD4DFC98DCE6",
"BTTLayoutIndependentActionChar" : "/",
"BTTAutoAdaptActionToKeyboardLayout" : true,
"BTTGenericActionConfig" : "autoAdapt",
"BTTShortcutToSend" : "55,44",
"BTTKeyboardShortcutKeyboardType" : 0,
"BTTEnabled" : 1,
"BTTEnabled2" : 1,
"BTTShortcutKeyCode" : -1,
"BTTShortcutModifierKeys" : -1,
"BTTOrder" : 1,
"BTTAutoAdaptToKeyboardLayout" : 0
},
{
"BTTLastUpdatedAt" : 1711097089.623904,
"BTTTriggerType" : -1,
"BTTTriggerParentUUID" : "3ABDE8E5-1A6D-4DA1-BB4A-F4DBD02E9C51",
"BTTIsPureAction" : true,
"BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
"BTTUUID" : "5B93AA9B-9471-4CCF-AF27-95FE785D860C",
"BTTPredefinedActionType" : 420,
"BTTPredefinedActionName" : "Change Input Source / Keyboard Layout",
"BTTKeyboardShortcutKeyboardType" : 0,
"BTTEnabled" : 1,
"BTTEnabled2" : 1,
"BTTShortcutKeyCode" : -1,
"BTTShortcutModifierKeys" : -1,
"BTTOrder" : 4,
"BTTAutoAdaptToKeyboardLayout" : 0
}
],
"BTTTriggerConfig" : {
"BTTKeyboardPreventRecursiveTriggers" : 1
}
}
]

Possibly try adding some delay after your "change input source" action. In that case also disable the auto-adapt.

Unfortunately BTT can't auto-translate all keys, that mostly only works for the standard letters and numbers.

I plan to add a conditional activation group condition for the current input source soon, then you could define the problematic shortcut twice, once per layout.

Wow! Quick reply! :clap: :smiley:
I successfully activated the function below, but it only operates once. Subsequently, I need to open a another window and return to the main window to execute it again. I enabled the HUD overlay to check if the trigger is activated, and it is, but the action remains incomplete unless I change window.

Any ideas?

[
  {
    "BTTLastUpdatedAt" : 1711098567.6935968,
    "BTTTriggerType" : 0,
    "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
    "BTTUUID" : "19A956FB-6C9D-460A-8E60-754C0AF90BD3",
    "BTTPredefinedActionType" : 366,
    "BTTPredefinedActionName" : "Empty Placeholder",
    "BTTAdditionalConfiguration" : "1048584",
    "BTTKeyboardShortcutScope" : 0,
    "BTTKeyboardShortcutKeyboardType" : 1213,
    "BTTTriggerOnDown" : 1,
    "BTTLayoutIndependentChar" : "-",
    "BTTEnabled" : 1,
    "BTTEnabled2" : 1,
    "BTTShortcutKeyCode" : 44,
    "BTTShortcutModifierKeys" : 1048576,
    "BTTOrder" : 2,
    "BTTAutoAdaptToKeyboardLayout" : 1,
    "BTTAdditionalActions" : [
      {
        "BTTLastUpdatedAt" : 1711098567.6935868,
        "BTTTriggerType" : -1,
        "BTTTriggerParentUUID" : "19A956FB-6C9D-460A-8E60-754C0AF90BD3",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeMagicMouse",
        "BTTUUID" : "F74520A7-A7CB-4975-9408-45E48CB32B0B",
        "BTTPredefinedActionType" : 420,
        "BTTPredefinedActionName" : "Change Input Source \/ Keyboard Layout",
        "BTTAdditionalActionData" : {
          "BTTActionChangeInputSource" : "U.S."
        },
        "BTTGenericActionConfig" : "U.S.",
        "BTTEnabled" : 1,
        "BTTEnabled2" : 1,
        "BTTOrder" : 0
      },
      {
        "BTTLastUpdatedAt" : 1711098567.6936011,
        "BTTTriggerType" : -1,
        "BTTTriggerParentUUID" : "19A956FB-6C9D-460A-8E60-754C0AF90BD3",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
        "BTTUUID" : "6F4C9065-DC79-4076-BD28-1A435FDD1750",
        "BTTLayoutIndependentActionChar" : "\/",
        "BTTAutoAdaptActionToKeyboardLayout" : true,
        "BTTGenericActionConfig" : "autoAdapt",
        "BTTShortcutToSend" : "55,44",
        "BTTKeyboardShortcutKeyboardType" : 0,
        "BTTEnabled" : 1,
        "BTTEnabled2" : 1,
        "BTTShortcutKeyCode" : -1,
        "BTTShortcutModifierKeys" : -1,
        "BTTOrder" : 1,
        "BTTAutoAdaptToKeyboardLayout" : 0
      },
      {
        "BTTLastUpdatedAt" : 1711098567.693594,
        "BTTTriggerType" : -1,
        "BTTTriggerParentUUID" : "19A956FB-6C9D-460A-8E60-754C0AF90BD3",
        "BTTIsPureAction" : true,
        "BTTTriggerClass" : "BTTTriggerTypeKeyboardShortcut",
        "BTTUUID" : "FC0F32B9-7F12-42A0-AD56-C2ADD46F03D3",
        "BTTPredefinedActionType" : 420,
        "BTTPredefinedActionName" : "Change Input Source \/ Keyboard Layout",
        "BTTAdditionalActionData" : {
          "BTTActionChangeInputSource" : "Norwegian"
        },
        "BTTGenericActionConfig" : "Norwegian",
        "BTTKeyboardShortcutKeyboardType" : 0,
        "BTTEnabled" : 1,
        "BTTEnabled2" : 1,
        "BTTShortcutKeyCode" : -1,
        "BTTShortcutModifierKeys" : -1,
        "BTTOrder" : 4,
        "BTTAutoAdaptToKeyboardLayout" : 0
      }
    ],
    "BTTTriggerConfig" : {
      "BTTKeyboardPreventRecursiveTriggers" : 1
    }
  }
]