Last active
January 18, 2018 17:24
-
-
Save airblade/506cac2be59fe18b57c27f6616436c5f to your computer and use it in GitHub Desktop.
Karabiner-Elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"global": { | |
"check_for_updates_on_startup": true, | |
"show_in_menu_bar": true, | |
"show_profile_name_in_menu_bar": false | |
}, | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"parameters": { | |
"basic.to_delayed_action_delay_milliseconds": 500, | |
"basic.to_if_alone_timeout_milliseconds": 1000, | |
"basic.to_if_held_down_threshold_milliseconds": 500 | |
}, | |
"rules": [ | |
{ | |
"description": "f1 opens iTerm", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f1" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'iTerm.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Shift+f2 opens Chrome URL in Safari", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f2", | |
"modifiers": { | |
"mandatory": [ | |
"shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "/Users/andy/bin/open-chrome-url-in-safari" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "f2 opens Safari", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f2" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'Safari.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "f3 opens Chrome", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f3" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'Google Chrome.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "f4 opens MacVim", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f4" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'MacVim.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "f5 opens Mail", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f5" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'Mail.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "f6 opens Calendar", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f6" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'Calendar.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Shift+f8 opens Downloads", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f8", | |
"modifiers": { | |
"mandatory": [ | |
"shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "open '/Users/andy/Downloads/'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "f8 opens Finder", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "f8" | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'Finder.app'" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Change Section to Hash", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "non_us_backslash" | |
}, | |
"to": [ | |
{ | |
"key_code": "3", | |
"modifiers": [ | |
"option" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Change Minus with Caps Lock to Underscore", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "hyphen", | |
"modifiers": { | |
"mandatory": [ | |
"caps_lock" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "hyphen", | |
"modifiers": [ | |
"left_shift", | |
"caps_lock" | |
] | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Left Shift x2 turns on Caps Lock; Left Shift turns off Caps Lock", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"mandatory": [ | |
"caps_lock" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" | |
}, | |
"to": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "shift pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift" | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "shift pressed", | |
"value": 1 | |
} | |
}, | |
{ | |
"key_code": "left_shift" | |
} | |
], | |
"to_delayed_action": { | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "shift pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "shift pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
} | |
] | |
}, | |
{ | |
"description": "Right Shift x2 turns on Caps Lock; Right Shift turns off Caps Lock", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_shift", | |
"modifiers": { | |
"mandatory": [ | |
"caps_lock" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_shift" | |
}, | |
"to": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "shift pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_shift" | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "shift pressed", | |
"value": 1 | |
} | |
}, | |
{ | |
"key_code": "right_shift" | |
} | |
], | |
"to_delayed_action": { | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "shift pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "shift pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
} | |
] | |
} | |
] | |
}, | |
"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 profile", | |
"selected": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "caps_lock" | |
}, | |
"to": { | |
"key_code": "left_control" | |
} | |
} | |
], | |
"virtual_hid_keyboard": { | |
"caps_lock_delay_milliseconds": 0, | |
"keyboard_type": "ansi" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment