Bug in BTT 6.885: F20 shortcut modified after restart (Caps Lock modifier added)

Note:
Before bug reporting, please make sure you have tried the latest (alpha) version of BetterTouchTool and that you have already tried to restart your system :-). If you encounter a crash, please attach a crash log from the macOS Console.app's "Crash Reports" section.


Hi Andreas,

I’d like to report a reproducible bug in BetterTouchTool 6.885 concerning keyboard shortcuts and key remapping.

My configuration:

  1. Remap Caps Lock → F20 using BTT’s Remap Keyboard Key feature.
  2. Create a Keyboard Shortcut triggered by F20.
  3. Assign the action Send Shortcut to Specific App, sending ⌃⌥⇧⌘ F12 to Alfred 5.

The Caps Lock remapping works reliably, including after restarting BTT.

However, the F20 Keyboard Shortcut stops working after every BTT restart. It only works again after manually recording the shortcut.

The problem is reproducible and visible in the exported JSON.

Immediately after recording F20, the configuration contains:

"BTTShortcutKeyCode": 90,
"BTTShortcutModifierKeys": 0,
"BTTAutoAdaptToKeyboardLayout": 0

After restarting BetterTouchTool, without recording the shortcut again:
"BTTShortcutKeyCode": 90,
"BTTShortcutModifierKeys": 8388608,
"BTTAutoAdaptToKeyboardLayout": 0

The modifier value changes automatically from 0 to 8388608 (0x800000, the macOS Caps Lock modifier flag).

Consequently, the shortcut no longer responds to F20 alone.

The behavior persists even with Auto adapt to current keyboard layout disabled.

The exported configuration also shows that BTTLastUpdatedAt changes, suggesting that BTT modifies the trigger during or after startup.

Workaround

I replaced the ordinary Keyboard Shortcut trigger with a Key Sequence detecting F20 (keycode 90).

This works reliably, including after restarting BTT.

Interestingly, I had to enable Delete typed characters after recognition for the Key Sequence to work. Despite this setting, no characters are actually deleted.

Expected behavior

BTT should preserve the original modifier configuration (BTTShortcutModifierKeys = 0) across restarts.

Actual behavior

BTT changes the modifier to 8388608, effectively turning F20 into Caps Lock + F20.

Could you investigate why the Caps Lock modifier is added when the shortcut is reloaded?

I can provide the complete JSON exports and screenshots if needed.

Thanks for your work on BetterTouchTool!

Best regards,
iveyears

Ah that's interesting.

Apple / macOS auto applies the function key modifier to F1-F19, but it seems like F20 is special and does not get that modifier key applied implicitly.

I'll add a special case with the next build.

Zur Erklärung/explanation:

I use useless caps lock for Alfred, that's why remap caps lock to a new neutral key without green light (F20).
F20 is the shortcut for Alfred (option-control-shift-command F12), this shortcut changes after restart. Easiest solution would be the possibility to use caps lock directly without remapping, but I don't know wether it's possible or not.
My workaround: Capslock -> F20 -> key sequence option-control-shift-command F12 is working correctly

The special case for F20 should now be added in 6.925, if you re-record the key once it should now stay like that even after restarting!