Skip to content

Instantly share code, notes, and snippets.

@DrJume
Last active February 10, 2022 14:18
Show Gist options
  • Save DrJume/4cb70ccf599ecec9ec649096e9a69bd4 to your computer and use it in GitHub Desktop.
Save DrJume/4cb70ccf599ecec9ec649096e9a69bd4 to your computer and use it in GitHub Desktop.
DrJume Karabiner-Elements complex modifications
{
"title": "DrJume Karabiner-Elements complex modifications (v2.1)",
"rules": [
{
"description": "Spacebar: Hold and combine with HJKL for vi movement keys",
"manipulators": [
{
"conditions": [
{
"name": "spacebar pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "spacebar pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "spacebar",
"modifiers": {}
},
"parameters": {
"basic.to_if_held_down_threshold_milliseconds": 200
},
"to": [
{
"key_code": "spacebar"
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "spacebar pressed",
"value": 0
}
}
],
"to_if_held_down": [
{
"key_code": "delete_or_backspace",
"repeat": false
},
{
"set_variable": {
"name": "spacebar pressed",
"value": 1
}
}
],
"type": "basic"
}
]
},
{
"description": "Capslock: Escape & Hold for Capslock",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to_after_key_up": [
{
"key_code": "escape"
}
],
"to_if_held_down": [
{
"key_code": "caps_lock",
"halt": true
}
],
"type": "basic"
}
]
},
{
"description": "Ctrl + Backspace: Forward Delete",
"manipulators": [
{
"from": {
"key_code": "delete_or_backspace",
"modifiers": {
"mandatory": [
"control"
],
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "delete_forward"
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment