Karabiner-elements: Caps Lock no longer works as caps_lock with to_if_alone

Created on 10 May 2018  路  2Comments  路  Source: pqrs-org/Karabiner-Elements

I've used the following stanza to change the behavior of the Caps Lock key in the following ways:

  1. When pressed alone, caps_lock toggles Caps Lock.
  2. When held down while another key is pressed, caps_lock acts as the left_control modifier

This behavior works just fine in 11.6.0 but seems broken in 12.0.0 - 12.0.7.

In 12.0.0 - 12.0.7, caps_lock is still seen as a key event when pressed alone, but it no longer activates Caps Lock. Caps Lock seems to behave normally when it isn't assigned.

javascript { "description": "Change caps_lock key to left_control if pressed with other keys. (Post caps_lock when pressed alone)", "manipulators": [ { "from": { "key_code": "caps_lock", "modifiers": { "optional": [ "any" ] } }, "to": [ { "key_code": "left_control", "lazy": true } ], "to_if_alone": [ { "key_code": "caps_lock" } ], "type": "basic" } ] }

Most helpful comment

Please use hold_down_milliseconds
https://github.com/tekezo/Karabiner-Elements/issues/1349#issuecomment-381379081

All 2 comments

Please use hold_down_milliseconds
https://github.com/tekezo/Karabiner-Elements/issues/1349#issuecomment-381379081

Thanks, that did it! For anyone interested, here's the fixed stanza:

```javascript
{
"description": "Change caps_lock key to left_control if pressed with other keys. (Post caps_lock when pressed alone)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "caps_lock",
"hold_down_milliseconds": 100
}
],
"type": "basic"
}
]
}

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Joilence picture Joilence  路  3Comments

LittleNewton picture LittleNewton  路  3Comments

chaucy picture chaucy  路  3Comments

cajhin picture cajhin  路  3Comments

Fengur picture Fengur  路  3Comments