Trying to map capslock key gives error

Trying to map the Capslock key as a hotkey causes BTT to start spamming the error:

The operation couldn’t be completed. (Cocoa error 1671.)

deleting or changing the hotkey from capslock stops the error code from being spammed.

One of my favoirte things to do with AHK on windows is give the capslock key and actually use. [luanch my note taking program] in Mac it took me a long time to find a remotely decent simple keyboard based fast search note taking program so I never got around to trying to map capslock to anything on Mac using BTT until now.

So hopefully this is a fixable issue.

BTT: 4.361
Mac Studio M2
macOS 14

I used Karabiner Elements to achieve this. It remaps caps lock to Cmnd+ctrl+option+shift.

When you set up the software it might already be one of the standard options under Complex Modifications, but if it's not, here's the code:

{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift.",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"type": "basic"
}
]
}

Mh, I'd try to restart BTT. The cocoa error is not related to caps lock. In general this should work fine. You can either assign a standard action or the "Act as Hyper Key" action.

Yep looks like restarting worked.

Thank you for the tips!

I'm now trying to figure out, how to not have it trigger if left shift is being held. It seems like this is what advanced conditions should be for, but it doesn't seem to work the way my brain seems to think it should. Tired the keycode 56, left_shift, shift, and left shift.

currently_pressed_keyboard_keys is a string that always ends with a comma, you'd need to match for 56, (or use the contains check and switch to "none of the following are true")