Skip to content

Instantly share code, notes, and snippets.

@DerekSelander
Last active April 10, 2023 16:40
Show Gist options
  • Save DerekSelander/3a66a906bcf30df88bbb4ee6af08a3bd to your computer and use it in GitHub Desktop.
Save DerekSelander/3a66a906bcf30df88bbb4ee6af08a3bd to your computer and use it in GitHub Desktop.
Derek's Karabiner stuff -> ~/.config/karabiner/karabiner.json
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 100,
"basic.to_delayed_action_delay_milliseconds": 5000,
"basic.to_if_alone_timeout_milliseconds": 200,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "Vi Mode #1d [D + H/J/K/L → Arrow Keys]",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "fn",
"modifiers": [
"left_control"
]
}
],
"to_if_alone": [
{
"key_code": "d"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "return_or_enter"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "spacebar",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "spacebar"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "tab",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "tab"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "hyphen",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "hyphen"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "equal_sign",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "equal_sign"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "open_bracket",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "open_bracket"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "close_bracket",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "close_bracket"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "backslash",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "backslash"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "non_us_pound",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "non_us_pound"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "semicolon"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "quote",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "quote"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "grave_accent_and_tilde"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "comma",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_arrow",
"modifiers": "right_option"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "period",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": "right_option"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "slash",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "slash"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "non_us_backslash",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "non_us_backslash"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "1",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "1"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "2",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "2"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "3"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "5",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "5"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "6",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "6"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "7",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "7"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "8",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "8"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "9",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "9"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "a",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "a"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "b",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "b"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "c",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "c"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "e",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "e"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "g",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "g"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "i",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "i"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "m",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "m"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "n",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "n"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "o",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "o"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "p",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "p"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "q"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "r",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "r"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "s",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "s"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "t",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "t"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "u",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "u"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "v",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "v"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "w",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "w"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "x",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "x"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "y",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "y"
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\."
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "z",
"modifiers": {
"mandatory": [
"control",
"fn"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "d"
},
{
"key_code": "z"
}
],
"type": "basic"
}
]
},
{
"description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
]
},
"devices": [],
"fn_function_keys": [
{
"from": {
"key_code": "f1"
},
"to": [
{
"consumer_key_code": "display_brightness_decrement"
}
]
},
{
"from": {
"key_code": "f2"
},
"to": [
{
"consumer_key_code": "display_brightness_increment"
}
]
},
{
"from": {
"key_code": "f3"
},
"to": [
{
"key_code": "mission_control"
}
]
},
{
"from": {
"key_code": "f4"
},
"to": [
{
"key_code": "launchpad"
}
]
},
{
"from": {
"key_code": "f5"
},
"to": [
{
"key_code": "illumination_decrement"
}
]
},
{
"from": {
"key_code": "f6"
},
"to": [
{
"key_code": "illumination_increment"
}
]
},
{
"from": {
"key_code": "f7"
},
"to": [
{
"consumer_key_code": "rewind"
}
]
},
{
"from": {
"key_code": "f8"
},
"to": [
{
"consumer_key_code": "play_or_pause"
}
]
},
{
"from": {
"key_code": "f9"
},
"to": [
{
"consumer_key_code": "fast_forward"
}
]
},
{
"from": {
"key_code": "f10"
},
"to": [
{
"consumer_key_code": "mute"
}
]
},
{
"from": {
"key_code": "f11"
},
"to": [
{
"consumer_key_code": "volume_decrement"
}
]
},
{
"from": {
"key_code": "f12"
},
"to": [
{
"consumer_key_code": "volume_increment"
}
]
}
],
"name": "Default profile",
"parameters": {
"delay_milliseconds_before_open_device": 1000
},
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": {
"country_code": 0,
"indicate_sticky_modifier_keys_state": true,
"mouse_key_xy_scale": 100
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment