Skip to content

Instantly share code, notes, and snippets.

@hengstchon
Created December 2, 2021 16:13
Show Gist options
  • Save hengstchon/5394060fbd9c608291ee0c3b937b35b1 to your computer and use it in GitHub Desktop.
Save hengstchon/5394060fbd9c608291ee0c3b937b35b1 to your computer and use it in GitHub Desktop.
~/.config/karabiner/assets/complex_modifications/
{
"title": "Customed",
"rules": [
{
"description": "Post caps_lock if fn is pressed alone",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "fn",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "fn"
}
],
"to_if_alone": [
{
"key_code": "caps_lock"
}
]
}
]
},
{
"description": "Post escape if left_control is pressed alone",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Post up_arrow if right_shift is pressed alone",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "right_shift",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "right_shift"
}
],
"to_if_alone": [
{
"key_code": "up_arrow"
}
],
"to_if_held_down": [
{
"key_code": "up_arrow"
}
],
"parameters": {
"basic.to_if_held_down_threshold_milliseconds": 150
}
}
]
},
{
"description": "Control+Command+Delete to start Screen Saver",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "delete_forward",
"modifiers": {
"mandatory": ["control", "command"]
}
},
"to": [
{
"shell_command": "open -a ScreenSaverEngine.app"
}
]
}
]
},
{
"description": "Left ctrl + hjkl to arrow keys Vim",
"manipulators": [
{
"consitions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": ["^com\\.googlecode\\.iterm2$"]
}
],
"from": {
"key_code": "h",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"consitions": [
{
"type": "frontmost_application_unless",
"bundle_identifiers": ["^com\\.googlecode\\.iterm2$"]
}
],
"from": {
"key_code": "l",
"modifiers": {
"mandatory": ["left_control"],
"optional": ["any"]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
}
]
},
{
"description": "Tab to HYPER (SHIFT+COMMAND+OPTION+CONTROL) or Tab (If Alone)",
"manipulators": [
{
"from": {
"key_code": "tab",
"modifiers": {}
},
"to": [
{
"key_code": "left_shift",
"modifiers": ["left_command", "left_control", "left_option"]
}
],
"to_if_alone": [
{
"key_code": "tab"
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment