# Trying to map capslock key gives error

**URL:** <https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672>\
**Category:** Bugs or Unexpected Behavior\
**Created:** [February 8, 2024, 6:07pm UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672 "2024-02-08T18:07:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![stickynoteme](https://community.folivora.ai/user_avatar/community.folivora.ai/stickynoteme/32/29111_2.png) [@stickynoteme](https://community.folivora.ai/u/stickynoteme)\
**Post date:** [February 8, 2024, 6:07pm UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672/1 "2024-02-08T18:07:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Sanggaard](https://community.folivora.ai/letter_avatar_proxy/v4/letter/s/87869e/32.png) [@Sanggaard](https://community.folivora.ai/u/Sanggaard)\
**Post date:** [February 8, 2024, 6:33pm UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672/2 "2024-02-08T18:33:02Z")

</div>

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"  
}  
]  
}

---

<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:** [February 8, 2024, 7:20pm UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672/3 "2024-02-08T19:20:06Z")

</div>

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.

 ![image](https://community.folivora.ai/uploads/default/original/3X/6/e/6ee5f59533ee62844a1bd682f376297d412fabad.jpeg)

---

<div class="post-metadata">

**Author:** ![stickynoteme](https://community.folivora.ai/user_avatar/community.folivora.ai/stickynoteme/32/29111_2.png) [@stickynoteme](https://community.folivora.ai/u/stickynoteme)\
**Post date:** [February 9, 2024, 6:57am UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672/4 "2024-02-09T06:57:28Z")

</div>

Yep looks like restarting worked.

Thank you for the tips!

---

<div class="post-metadata">

**Author:** ![stickynoteme](https://community.folivora.ai/user_avatar/community.folivora.ai/stickynoteme/32/29111_2.png) [@stickynoteme](https://community.folivora.ai/u/stickynoteme)\
**Post date:** [February 9, 2024, 7:38am UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672/5 "2024-02-09T07:38:21Z")

</div>

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.

 ![Screenshot 2024-02-08 at 11.30.04 PM](https://community.folivora.ai/uploads/default/original/3X/0/3/033f480a18ab6281d1755bc64b0e5a9e831c6639.jpeg)

---

<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:** [February 9, 2024, 7:41am UTC](https://community.folivora.ai/t/trying-to-map-capslock-key-gives-error/35672/6 "2024-02-09T07:41:29Z")

</div>

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")
