Skip to content

Instantly share code, notes, and snippets.

@mtso
Created May 30, 2022 19:55
Show Gist options
  • Save mtso/5a9691f8da58e0465d5d7e5bba97fe01 to your computer and use it in GitHub Desktop.
Save mtso/5a9691f8da58e0465d5d7e5bba97fe01 to your computer and use it in GitHub Desktop.
Karabiner Elements - Double Left Shift to Caps Lock modification. https://karabiner-elements.pqrs.org/ , https://github.com/pqrs-org/KE-complex_modifications
{
"title": "Double left_shift to become caps_lock",
"rules": [
{
"description": "Double left_shift to become caps_lock.",
"manipulators": [
{
"conditions": [
{
"name": "left_shift pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "caps_lock"
}
],
"type": "basic"
},
{
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "left_shift pressed",
"value": 1
}
},
{
"key_code": "left_shift"
}
],
"to_delayed_action": {
"to_if_canceled": [
{
"set_variable": {
"name": "left_shift pressed",
"value": 0
}
}
],
"to_if_invoked": [
{
"set_variable": {
"name": "left_shift pressed",
"value": 0
}
}
]
},
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment