Skip to content

Instantly share code, notes, and snippets.

@kaushikgopal
Last active January 11, 2021 17:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kaushikgopal/c802ca81044066f7d93a50c5269cc812 to your computer and use it in GitHub Desktop.
Save kaushikgopal/c802ca81044066f7d93a50c5269cc812 to your computer and use it in GitHub Desktop.
Karabiner.json generated using Goku. For source edn file see https://gist.github.com/kaushikgopal/ff7a92bbc887e59699c804b59074a126
{
"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" : 500,
"basic.to_if_held_down_threshold_milliseconds" : 1000
},
"rules" : [ {
"description" : "[ mode",
"manipulators" : [ {
"from" : {
"key_code" : "close_bracket"
},
"to" : [ {
"key_code" : "open_bracket",
"modifiers" : [ "left_shift" ]
} ],
"conditions" : [ {
"name" : "open-bracket-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "open-bracket-mode",
"value" : 1
}
}, {
"key_code" : "open_bracket",
"modifiers" : [ "left_shift" ]
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "open_bracket"
}, {
"key_code" : "close_bracket"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "open-bracket-mode",
"value" : 0
}
} ]
}
}
} ]
}, {
"description" : "] mode",
"manipulators" : [ {
"from" : {
"key_code" : "open_bracket"
},
"to" : [ {
"key_code" : "close_bracket",
"modifiers" : [ "left_shift" ]
} ],
"conditions" : [ {
"name" : "close-bracket-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "close-bracket-mode",
"value" : 1
}
}, {
"key_code" : "close_bracket",
"modifiers" : [ "left_shift" ]
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "close_bracket"
}, {
"key_code" : "open_bracket"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "close-bracket-mode",
"value" : 0
}
} ]
}
}
} ]
}, {
"description" : "o-mode: quick open",
"manipulators" : [ {
"from" : {
"key_code" : "f"
},
"to" : [ {
"shell_command" : "open \"/Applications/Firefox.app\""
} ],
"conditions" : [ {
"name" : "o-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 1
}
}, {
"shell_command" : "open \"/Applications/Firefox.app\""
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "o"
}, {
"key_code" : "f"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 0
}
} ]
}
}
}, {
"from" : {
"key_code" : "g"
},
"to" : [ {
"shell_command" : "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"0) Search Google\"'"
} ],
"conditions" : [ {
"name" : "o-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 1
}
}, {
"shell_command" : "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"0) Search Google\"'"
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "o"
}, {
"key_code" : "g"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 0
}
} ]
}
}
}, {
"from" : {
"key_code" : "i"
},
"to" : [ {
"shell_command" : "open \"/Applications/iTerm.app\""
} ],
"conditions" : [ {
"name" : "o-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 1
}
}, {
"shell_command" : "open \"/Applications/iTerm.app\""
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "o"
}, {
"key_code" : "i"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 0
}
} ]
}
}
}, {
"from" : {
"key_code" : "q"
},
"to" : [ {
"shell_command" : "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"open: Quip\"'"
} ],
"conditions" : [ {
"name" : "o-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 1
}
}, {
"shell_command" : "osascript -e 'tell application \"Keyboard Maestro Engine\" to do script \"open: Quip\"'"
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "o"
}, {
"key_code" : "q"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 0
}
} ]
}
}
}, {
"from" : {
"key_code" : "t"
},
"to" : [ {
"shell_command" : "open \"/Applications/Things3.app\""
} ],
"conditions" : [ {
"name" : "o-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"type" : "basic",
"parameters" : {
"basic.simultaneous_threshold_milliseconds" : 250
},
"to" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 1
}
}, {
"shell_command" : "open \"/Applications/Things3.app\""
} ],
"from" : {
"simultaneous" : [ {
"key_code" : "o"
}, {
"key_code" : "t"
} ],
"simultaneous_options" : {
"detect_key_down_uninterruptedly" : true,
"key_down_order" : "strict",
"key_up_order" : "strict_inverse",
"key_up_when" : "any",
"to_after_key_up" : [ {
"set_variable" : {
"name" : "o-mode",
"value" : 0
}
} ]
}
}
} ]
}, {
"description" : "right cmd -> right ctrl",
"manipulators" : [ {
"from" : {
"key_code" : "right_command",
"modifiers" : {
"optional" : [ "any" ]
}
},
"to" : [ {
"key_code" : "right_control"
} ],
"conditions" : [ {
"identifiers" : [ {
"vendor_id" : 1452,
"product_id" : 635
}, {
"vendor_id" : 1452,
"product_id" : 615
}, {
"vendor_id" : 1241,
"product_id" : 41618
} ],
"type" : "device_if"
} ],
"type" : "basic"
} ]
}, {
"description" : "left shift once -> (",
"manipulators" : [ {
"to_if_alone" : [ {
"key_code" : "9",
"modifiers" : [ "left_shift" ]
} ],
"from" : {
"key_code" : "left_shift",
"modifiers" : {
"optional" : [ "any" ]
}
},
"to" : [ {
"key_code" : "left_shift"
} ],
"type" : "basic"
} ]
}, {
"description" : "right shift once -> )",
"manipulators" : [ {
"to_if_alone" : [ {
"key_code" : "0",
"modifiers" : [ "left_shift" ]
} ],
"from" : {
"key_code" : "right_shift",
"modifiers" : {
"optional" : [ "any" ]
}
},
"to" : [ {
"key_code" : "right_shift"
} ],
"type" : "basic"
} ]
}, {
"description" : "caps lock : vim navigation + escape",
"manipulators" : [ {
"to_if_alone" : [ {
"key_code" : "escape"
} ],
"to_after_key_up" : [ {
"set_variable" : {
"name" : "caps-lock-mode",
"value" : 0
}
} ],
"from" : {
"key_code" : "caps_lock"
},
"to" : [ {
"set_variable" : {
"name" : "caps-lock-mode",
"value" : 1
}
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "h"
},
"to" : [ {
"key_code" : "left_arrow"
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "j"
},
"to" : [ {
"key_code" : "down_arrow"
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "k"
},
"to" : [ {
"key_code" : "up_arrow"
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "l"
},
"to" : [ {
"key_code" : "right_arrow"
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "h",
"modifiers" : {
"mandatory" : [ "left_shift" ]
}
},
"to" : [ {
"key_code" : "left_arrow",
"modifiers" : [ "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "j",
"modifiers" : {
"mandatory" : [ "left_shift" ]
}
},
"to" : [ {
"key_code" : "down_arrow",
"modifiers" : [ "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "k",
"modifiers" : {
"mandatory" : [ "left_shift" ]
}
},
"to" : [ {
"key_code" : "up_arrow",
"modifiers" : [ "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "l",
"modifiers" : {
"mandatory" : [ "left_shift" ]
}
},
"to" : [ {
"key_code" : "right_arrow",
"modifiers" : [ "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "h",
"modifiers" : {
"mandatory" : [ "left_command" ]
}
},
"to" : [ {
"key_code" : "left_arrow",
"modifiers" : [ "left_command" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "j",
"modifiers" : {
"mandatory" : [ "left_command" ]
}
},
"to" : [ {
"key_code" : "down_arrow",
"modifiers" : [ "left_command" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "k",
"modifiers" : {
"mandatory" : [ "left_command" ]
}
},
"to" : [ {
"key_code" : "up_arrow",
"modifiers" : [ "left_command" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "l",
"modifiers" : {
"mandatory" : [ "left_command" ]
}
},
"to" : [ {
"key_code" : "right_arrow",
"modifiers" : [ "left_command" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "h",
"modifiers" : {
"mandatory" : [ "left_command", "left_shift" ]
}
},
"to" : [ {
"key_code" : "left_arrow",
"modifiers" : [ "left_command", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "j",
"modifiers" : {
"mandatory" : [ "left_command", "left_shift" ]
}
},
"to" : [ {
"key_code" : "down_arrow",
"modifiers" : [ "left_command", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "k",
"modifiers" : {
"mandatory" : [ "left_command", "left_shift" ]
}
},
"to" : [ {
"key_code" : "up_arrow",
"modifiers" : [ "left_command", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "l",
"modifiers" : {
"mandatory" : [ "left_command", "left_shift" ]
}
},
"to" : [ {
"key_code" : "right_arrow",
"modifiers" : [ "left_command", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "h",
"modifiers" : {
"mandatory" : [ "left_option" ]
}
},
"to" : [ {
"key_code" : "left_arrow",
"modifiers" : [ "left_option" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "j",
"modifiers" : {
"mandatory" : [ "left_option" ]
}
},
"to" : [ {
"key_code" : "down_arrow",
"modifiers" : [ "left_option" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "k",
"modifiers" : {
"mandatory" : [ "left_option" ]
}
},
"to" : [ {
"key_code" : "up_arrow",
"modifiers" : [ "left_option" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "l",
"modifiers" : {
"mandatory" : [ "left_option" ]
}
},
"to" : [ {
"key_code" : "right_arrow",
"modifiers" : [ "left_option" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "h",
"modifiers" : {
"mandatory" : [ "left_option", "left_shift" ]
}
},
"to" : [ {
"key_code" : "left_arrow",
"modifiers" : [ "left_option", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "j",
"modifiers" : {
"mandatory" : [ "left_option", "left_shift" ]
}
},
"to" : [ {
"key_code" : "down_arrow",
"modifiers" : [ "left_option", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "k",
"modifiers" : {
"mandatory" : [ "left_option", "left_shift" ]
}
},
"to" : [ {
"key_code" : "up_arrow",
"modifiers" : [ "left_option", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"type" : "basic"
}, {
"from" : {
"key_code" : "l",
"modifiers" : {
"mandatory" : [ "left_option", "left_shift" ]
}
},
"to" : [ {
"key_code" : "right_arrow",
"modifiers" : [ "left_option", "left_shift" ]
} ],
"conditions" : [ {
"name" : "caps-lock-mode",
"value" : 1,
"type" : "variable_if"
} ],
"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" : "fastforward"
}
}, {
"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",
"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