Skip to content

Instantly share code, notes, and snippets.

@svemat01
Created January 20, 2025 23:35
Show Gist options
  • Save svemat01/859d8bb5e25a999c32d2f4936e120aa7 to your computer and use it in GitHub Desktop.
Save svemat01/859d8bb5e25a999c32d2f4936e120aa7 to your computer and use it in GitHub Desktop.
Karabiner Elements configs
{
"description": "Caps Lock → Hyper Key (⌃⌥⇧⌘) (Caps Lock if alone)",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": [],
"optional": ["any"]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock_down",
"value": 1
}
},
{
"key_code": "right_shift",
"modifiers": ["right_command", "right_control", "right_option"]
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock_down",
"value": 0
}
}
],
"to_if_alone": [{ "key_code": "escape" }],
"type": "basic"
}
]
}
{
"description": "Caps Lock + Shift + arrow keys → hyper + f13-f16",
"manipulators": [
{
"from": {
"key_code": "left_arrow",
"modifiers": { "mandatory": ["left_shift", "right_shift", "right_command", "right_control", "right_option"] }
},
"to": [
{
"key_code": "f13",
"modifiers": ["left_shift", "right_shift", "right_command", "right_control", "right_option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "right_arrow",
"modifiers": { "mandatory": ["left_shift", "right_shift", "right_command", "right_control", "right_option"] }
},
"to": [
{
"key_code": "f14",
"modifiers": ["left_shift", "right_shift", "right_command", "right_control", "right_option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "up_arrow",
"modifiers": { "mandatory": ["left_shift", "right_shift", "right_command", "right_control", "right_option"] }
},
"to": [
{
"key_code": "f15",
"modifiers": ["left_shift", "right_shift", "right_command", "right_control", "right_option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "down_arrow",
"modifiers": { "mandatory": ["left_shift", "right_shift", "right_command", "right_control", "right_option"] }
},
"to": [
{
"key_code": "f16",
"modifiers": ["left_shift", "right_shift", "right_command", "right_control", "right_option"]
}
],
"type": "basic"
},
{
"from": {
"key_code": "spacebar",
"modifiers": { "mandatory": ["left_shift", "right_shift", "right_command", "right_control", "right_option"] }
},
"to": [
{
"key_code": "f17",
"modifiers": ["left_shift", "right_shift", "right_command", "right_control", "right_option"]
}
],
"type": "basic"
}
]
}
{
"description": "Mac OSX: double-tap right shift key → caps lock toggle",
"manipulators": [
{
"conditions": [
{
"name": "right_shift pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "right_shift",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "caps_lock" }],
"type": "basic"
},
{
"from": {
"key_code": "right_shift",
"modifiers": { "optional": ["any"] }
},
"to": [
{
"set_variable": {
"name": "right_shift pressed",
"value": 1
}
},
{ "key_code": "right_shift" }
],
"to_delayed_action": {
"to_if_canceled": [
{
"set_variable": {
"name": "right_shift pressed",
"value": 0
}
}
],
"to_if_invoked": [
{
"set_variable": {
"name": "right_shift pressed",
"value": 0
}
}
]
},
"type": "basic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment