Skip to content

Instantly share code, notes, and snippets.

@ybbond
Last active July 26, 2021 06:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ybbond/fcf142e67c62d22981e86467530b8bc9 to your computer and use it in GitHub Desktop.
Save ybbond/fcf142e67c62d22981e86467530b8bc9 to your computer and use it in GitHub Desktop.
Complex modification for Karabiner Elements. H to →, J to ↓, K to ↑, L to →
{
"title": "HJKL to Arrow Navigation",
"rules": [
{
"description": "HJKL to Arrow Navigation",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "left_arrow"
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui"
]
},
"key_code": "h"
},
"to": [
{
"repeat": true,
"key_code": "left_arrow",
"modifiers": [
"left_gui"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt"
]
},
"key_code": "h"
},
"to": [
{
"repeat": true,
"key_code": "left_arrow",
"modifiers": [
"left_alt"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_shift"
]
},
"key_code": "h"
},
"to": [
{
"repeat": true,
"key_code": "left_arrow",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui",
"left_shift"
]
},
"key_code": "h"
},
"to": [
{
"repeat": true,
"key_code": "left_arrow",
"modifiers": [
"left_gui",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt",
"left_shift"
]
},
"key_code": "h"
},
"to": [
{
"repeat": true,
"key_code": "left_arrow",
"modifiers": [
"left_alt",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "down_arrow"
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui"
]
},
"key_code": "j"
},
"to": [
{
"repeat": true,
"key_code": "down_arrow",
"modifiers": [
"left_gui"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt"
]
},
"key_code": "j"
},
"to": [
{
"repeat": true,
"key_code": "down_arrow",
"modifiers": [
"left_alt"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_shift"
]
},
"key_code": "j"
},
"to": [
{
"repeat": true,
"key_code": "down_arrow",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui",
"left_shift"
]
},
"key_code": "j"
},
"to": [
{
"repeat": true,
"key_code": "down_arrow",
"modifiers": [
"left_gui",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt",
"left_shift"
]
},
"key_code": "j"
},
"to": [
{
"repeat": true,
"key_code": "down_arrow",
"modifiers": [
"left_alt",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "up_arrow"
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui"
]
},
"key_code": "k"
},
"to": [
{
"repeat": true,
"key_code": "up_arrow",
"modifiers": [
"left_gui"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt"
]
},
"key_code": "k"
},
"to": [
{
"repeat": true,
"key_code": "up_arrow",
"modifiers": [
"left_alt"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_shift"
]
},
"key_code": "k"
},
"to": [
{
"repeat": true,
"key_code": "up_arrow",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui",
"left_shift"
]
},
"key_code": "k"
},
"to": [
{
"repeat": true,
"key_code": "up_arrow",
"modifiers": [
"left_gui",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt",
"left_shift"
]
},
"key_code": "k"
},
"to": [
{
"repeat": true,
"key_code": "up_arrow",
"modifiers": [
"left_alt",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift"
]
}
},
"to": [
{
"repeat": true,
"key_code": "right_arrow"
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui"
]
},
"key_code": "l"
},
"to": [
{
"repeat": true,
"key_code": "right_arrow",
"modifiers": [
"left_gui"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt"
]
},
"key_code": "l"
},
"to": [
{
"repeat": true,
"key_code": "right_arrow",
"modifiers": [
"left_alt"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_shift"
]
},
"key_code": "l"
},
"to": [
{
"repeat": true,
"key_code": "right_arrow",
"modifiers": [
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_gui",
"left_shift"
]
},
"key_code": "l"
},
"to": [
{
"repeat": true,
"key_code": "right_arrow",
"modifiers": [
"left_gui",
"left_shift"
]
}
]
},
{
"type": "basic",
"from": {
"modifiers": {
"mandatory": [
"right_gui",
"right_control",
"right_alt",
"right_shift",
"left_alt",
"left_shift"
]
},
"key_code": "l"
},
"to": [
{
"repeat": true,
"key_code": "right_arrow",
"modifiers": [
"left_alt",
"left_shift"
]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment