Skip to content

Instantly share code, notes, and snippets.

@alok
Created October 16, 2017 03:13
Show Gist options
  • Save alok/d616857aef4c374d98890b16dd8d63a0 to your computer and use it in GitHub Desktop.
Save alok/d616857aef4c374d98890b16dd8d63a0 to your computer and use it in GitHub Desktop.
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "Delete to control when held",
"manipulators": [
{
"from": {
"key_code": "delete_or_backspace",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "delete_or_backspace" }],
"to_if_alone": [{ "key_code": "left_control" }],
"type": "basic"
}
]
},
{
"description": "Single quote to alt-right when held",
"manipulators": [
{
"from": {
"key_code": "quote",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "right_option" }],
"to_if_alone": [{ "key_code": "quote" }],
"type": "basic"
}
]
},
{
"description": "Space to shift when held",
"manipulators": [
{
"from": {
"key_code": "spacebar",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_shift" }],
"to_if_alone": [{ "key_code": "spacebar" }],
"type": "basic"
}
]
},
{
"description": "Hyper tab",
"manipulators": [
{
"from": {
"key_code": "tab",
"modifiers": { "optional": ["any"] }
},
"to": [
{
"key_code": "left_shift",
"modifiers": ["control", "command", "option"]
}
],
"to_if_alone": [{ "key_code": "tab" }],
"type": "basic"
}
]
},
{
"description": "Hyper page down",
"manipulators": [
{
"from": {
"key_code": "page_down",
"modifiers": { "optional": ["any"] }
},
"to": [
{
"key_code": "left_shift",
"modifiers": ["control", "command", "option"]
}
],
"to_if_alone": [{ "key_code": "page_down" }],
"type": "basic"
}
]
},
{
"description": "Backquote to tilde in terminals",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net.sourceforge.iTerm",
"^com.googlecode.iterm2",
"^net.kovidgoyal.kitty",
"^net.kovidgoyal.kitty2",
"^com.extropy.oni",
"^com.ident.gonvim",
"^com.alfredapp.Alfred",
"^com.apple.finder",
"^com.apple.Terminal"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "grave_accent_and_tilde"
},
"to": [
{
"key_code": "grave_accent_and_tilde",
"modifiers": ["shift"]
}
],
"type": "basic"
}
]
},
{
"description": "Tilde to backquote in terminals",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net.sourceforge.iTerm",
"^com.googlecode.iterm2",
"^net.kovidgoyal.kitty",
"^net.kovidgoyal.kitty2",
"^com.extropy.oni",
"^com.ident.gonvim",
"^com.alfredapp.Alfred",
"^com.apple.finder",
"^com.apple.Terminal"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "grave_accent_and_tilde",
"modifiers": { "mandatory": ["shift"] }
},
"to": [{ "key_code": "grave_accent_and_tilde" }],
"type": "basic"
}
]
},
{
"description": "Semicolon to colon",
"manipulators": [
{
"from": { "key_code": "p" },
"to": [
{
"key_code": "p",
"modifiers": ["shift"]
}
],
"type": "basic"
}
]
},
{
"description": "Colon to semicolon (';' is 'p' in colemak)",
"manipulators": [
{
"from": {
"key_code": "p",
"modifiers": { "mandatory": ["shift"] }
},
"to": [{ "key_code": "p" }],
"type": "basic"
}
]
},
{
"description": "Left bracket to cursor down in PDF reader",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com.apple.Preview",
"^net.sourceforge.skim-app.skim"
],
"type": "frontmost_application_if"
}
],
"from": { "key_code": "open_bracket" },
"to": [{ "key_code": "down_arrow" }],
"type": "basic"
}
]
},
{
"description": "fn to mission_control when alone",
"manipulators": [
{
"from": { "key_code": "fn" },
"to": [{ "key_code": "mission_control" }],
"to_if_alone": [{ "key_code": "fn" }],
"type": "basic"
}
]
},
{
"description": "shift left paren",
"manipulators": [
{
"from": {
"key_code": "left_shift",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_shift" }],
"to_if_alone": [
{
"key_code": "9",
"modifiers": ["shift"]
}
],
"type": "basic"
}
]
},
{
"description": "shift right paren",
"manipulators": [
{
"from": {
"key_code": "right_shift",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "right_shift" }],
"to_if_alone": [
{ "key_code": "0", "modifiers": ["shift"] }
],
"type": "basic"
}
]
},
{
"description": "right bracket to cursor down in PDF reader",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com.apple.Preview",
"^net.sourceforge.skim-app.skim"
],
"type": "frontmost_application_if"
}
],
"from": { "key_code": "close_bracket" },
"to": [{ "key_code": "up_arrow" }],
"type": "basic"
}
]
},
{
"description": "caps lock to control and escape",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_control" }],
"to_if_alone": [{ "key_code": "escape" }],
"type": "basic"
}
]
},
{
"description": "Enter to left-option",
"manipulators": [
{
"from": {
"key_code": "return_or_enter",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_option" }],
"to_if_alone": [{ "key_code": "return_or_enter" }],
"type": "basic"
}
]
},
{
"description": "home to f14 and control",
"manipulators": {
"from": { "key_code": "home" },
"to": [{ "key_code": "f14" }],
"to_if_alone": [{ "key_code": "left_control" }],
"type": "basic"
}
},
{
"description": "end to f13 and option",
"manipulators": {
"from": { "key_code": "end" },
"to": [{ "key_code": "f13" }],
"to_if_alone": [{ "key_code": "left_option" }],
"type": "basic"
}
},
{
"description": "pageup to f16 and option",
"manipulators": {
"from": { "key_code": "page_up" },
"to": [{ "key_code": "f16" }],
"to_if_alone": [{ "key_code": "left_option" }],
"type": "basic"
}
},
{
"description": "page_down to f17 and option",
"manipulators": {
"from": { "key_code": "page_down" },
"to": [{ "key_code": "f17" }],
"to_if_alone": [{ "key_code": "left_option" }],
"type": "basic"
}
},
{
"description": "command alfred",
"manipulators": {
"from": { "key_code": "left_command" },
"to": [{ "key_code": "left_command" }],
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": ["control", "command"]
}
],
"type": "basic"
}
},
{
"description": "option to option f4",
"manipulators": {
"from": { "key_code": "left_option" },
"to": [{ "key_code": "left_option" }],
"to_if_alone": [{ "key_code": "f4" }],
"type": "basic"
}
},
{
"description": "command f18",
"manipulators": {
"from": { "key_code": "right_command" },
"to": [{ "key_code": "right_command" }],
"to_if_alone": [{ "key_code": "f18" }],
"type": "basic"
}
},
{
"description": "right_control to opt f16",
"manipulators": {
"from": { "key_code": "right_control" },
"to": [{ "key_code": "right_control" }],
"to_if_alone": [
{
"key_code": "f16",
"modifiers": ["option"]
}
],
"type": "basic"
}
},
{
"description": "c-w to kill words",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net.sourceforge.iTerm",
"^com.googlecode.iterm2",
"^net.kovidgoyal.kitty",
"^net.kovidgoyal.kitty2",
"^com.extropy.oni",
"^com.ident.gonvim",
"^com.apple.finder",
"^com.apple.Terminal"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "w",
"modifiers": { "mandatory": ["control"] }
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": ["option"]
}
],
"type": "basic"
}
]
},
{
"description": "c-u to kill lines",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^net.sourceforge.iTerm",
"^com.googlecode.iterm2",
"^net.kovidgoyal.kitty",
"^net.kovidgoyal.kitty2",
"^com.extropy.oni",
"^com.ident.gonvim",
"^com.apple.finder",
"^com.apple.Terminal"
],
"type": "frontmost_application_unless"
}
],
"from": {
"key_code": "i",
"modifiers": { "mandatory": ["control"] }
},
"to": [
{
"key_code": "delete_or_backspace",
"modifiers": ["command"]
}
],
"type": "basic"
}
]
},
{
"description": "8 -> * in anki",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^net.ichi2.anki"],
"type": "frontmost_application_if"
}
],
"from": { "key_code": "8" },
"to": [{ "key_code": "8", "modifiers": ["shift"] }],
"type": "basic"
}
]
},
{
"description": "* -> 8 in anki",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": ["^net.ichi2.anki"],
"type": "frontmost_application_if"
}
],
"from": { "key_code": "8", "modifiers": ["shift"] },
"to": [{ "key_code": "8" }],
"type": "basic"
}
]
}
]
},
"devices": [],
"fn_function_keys": {
"f1": "vk_consumer_brightness_down",
"f10": "mute",
"f11": "volume_down",
"f12": "volume_up",
"f2": "vk_consumer_brightness_up",
"f3": "vk_mission_control",
"f4": "vk_launchpad",
"f5": "vk_consumer_illumination_down",
"f6": "vk_consumer_illumination_up",
"f7": "vk_consumer_previous",
"f8": "vk_consumer_play",
"f9": "vk_consumer_next"
},
"name": "Default profile",
"one_to_many_mappings": {},
"selected": true,
"simple_modifications": {},
"standalone_keys": {},
"virtual_hid_keyboard": {
"caps_lock_delay_milliseconds": 0,
"keyboard_type": "ansi",
"standalone_keys_delay_milliseconds": 200
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment