Skip to content

Instantly share code, notes, and snippets.

@veryeasily
Created July 23, 2021 18:05
Show Gist options
  • Save veryeasily/d5505ee1d05e8750030319317e799382 to your computer and use it in GitHub Desktop.
Save veryeasily/d5505ee1d05e8750030319317e799382 to your computer and use it in GitHub Desktop.
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": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500,
"mouse_motion_to_scroll.speed": 100
},
"rules": [
{
"description": "Change caps_lock to command if not in iterm2 or vim",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\.",
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$",
"^co\\.zeit\\.hyperterm$",
"^co\\.zeit\\.hyper$",
"^io\\.alacritty$",
"^net\\.kovidgoyal\\.kitty$"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_command" }],
"type": "basic"
}
]
},
{
"description": "Change caps_lock to control in vim or iterm2",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^org\\.vim\\.",
"^com\\.apple\\.Terminal$",
"^com\\.googlecode\\.iterm2$",
"^co\\.zeit\\.hyperterm$",
"^co\\.zeit\\.hyper$",
"^io\\.alacritty$",
"^net\\.kovidgoyal\\.kitty$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_control" }],
"type": "basic"
}
]
},
{
"description": "Launch Applications with right modifier keys",
"manipulators": [
{
"from": {
"key_code": "f",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [
{
"shell_command": "open '/System/Library/CoreServices/Finder.app'"
}
],
"type": "basic"
},
{
"from": {
"key_code": "w",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [
{
"shell_command": "open '/Applications/Google Chrome Dev.app'"
}
],
"type": "basic"
},
{
"from": {
"key_code": "q",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [
{
"shell_command": "open '/Applications/Visual Studio Code.app'"
}
],
"type": "basic"
},
{
"from": {
"key_code": "e",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [
{
"shell_command": "osascript '/usr/local/bin/open_unity.scpt'"
}
],
"type": "basic"
},
{
"from": {
"key_code": "e",
"modifiers": {
"mandatory": ["right_option"],
"optional": ["caps_lock"]
}
},
"to": [
{ "shell_command": "open '/Applications/Unity Hub.app'" }
],
"type": "basic"
},
{
"from": {
"key_code": "q",
"modifiers": {
"mandatory": ["right_option"],
"optional": ["caps_lock"]
}
},
"to": [{ "shell_command": "open '/Applications/Rider.app'" }],
"type": "basic"
},
{
"from": {
"key_code": "f",
"modifiers": {
"mandatory": ["right_option"],
"optional": ["caps_lock"]
}
},
"to": [
{
"shell_command": "open '/System/Applications/Utilities/Activity Monitor.app'"
}
],
"type": "basic"
},
{
"from": {
"key_code": "r",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [{ "shell_command": "open '/Applications/Slack.app'" }],
"type": "basic"
},
{
"from": {
"key_code": "r",
"modifiers": {
"mandatory": ["right_option"],
"optional": ["caps_lock"]
}
},
"to": [{ "shell_command": "open '/Applications/Discord.app'" }],
"type": "basic"
},
{
"from": {
"key_code": "d",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [{ "shell_command": "open '/Applications/iTerm.app'" }],
"type": "basic"
},
{
"from": {
"key_code": "s",
"modifiers": {
"mandatory": ["right_control"],
"optional": ["caps_lock"]
}
},
"to": [{ "shell_command": "open '/Applications/Spotify.app'" }],
"type": "basic"
}
]
},
{
"description": "Disable right click on XnView MP",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^com\\.xnview\\.XnView$"],
"type": "frontmost_application_if"
}
],
"from": { "pointing_button": "button2" },
"to": [{ "key_code": "spacebar" }],
"type": "basic"
}
]
}
]
},
"devices": [
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 12317,
"vendor_id": 16700
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
},
{
"disable_built_in_keyboard_if_exists": false,
"fn_function_keys": [],
"identifiers": {
"is_keyboard": false,
"is_pointing_device": true,
"product_id": 19727,
"vendor_id": 1121
},
"ignore": false,
"manipulate_caps_lock_led": false,
"simple_modifications": []
}
],
"fn_function_keys": [
{ "from": { "key_code": "f1" }, "to": { "key_code": "f1" } },
{ "from": { "key_code": "f2" }, "to": { "key_code": "f2" } },
{ "from": { "key_code": "f3" }, "to": { "key_code": "f3" } },
{ "from": { "key_code": "f4" }, "to": { "key_code": "f4" } },
{ "from": { "key_code": "f5" }, "to": { "key_code": "f5" } },
{ "from": { "key_code": "f6" }, "to": { "key_code": "f6" } },
{ "from": { "key_code": "f7" }, "to": { "key_code": "f7" } },
{ "from": { "key_code": "f8" }, "to": { "key_code": "f8" } },
{ "from": { "key_code": "f9" }, "to": { "key_code": "f9" } },
{ "from": { "key_code": "f10" }, "to": { "key_code": "f10" } },
{ "from": { "key_code": "f11" }, "to": { "key_code": "f11" } },
{ "from": { "key_code": "f12" }, "to": { "key_code": "f12" } }
],
"name": "Default",
"parameters": { "delay_milliseconds_before_open_device": 1000 },
"selected": true,
"simple_modifications": [],
"virtual_hid_keyboard": { "country_code": 0, "mouse_key_xy_scale": 100 }
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment