Last active
February 18, 2019 06:24
-
-
Save lecion/3f90f3caff5da228511810c12d784903 to your computer and use it in GitHub Desktop.
My config for 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.simultaneous_threshold_milliseconds": 50, | |
"basic.to_delayed_action_delay_milliseconds": 400, | |
"basic.to_if_alone_timeout_milliseconds": 700, | |
"basic.to_if_held_down_threshold_milliseconds": 500 | |
}, | |
"rules": [ | |
{ | |
"description": "Change caps_lock key to command+control+option+shift. (Post escape key when pressed alone)", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift", | |
"modifiers": [ | |
"left_command", | |
"left_control", | |
"left_option" | |
] | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "escape" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Change Hyper + H/J/K/L to Arrow Keys, X to forward delete", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "spacebar", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "x", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "delete_forward" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "a", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "a", | |
"modifiers": [ | |
"left_control" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "e", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "e", | |
"modifiers": [ | |
"left_control" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "f", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"shell_command": "open -a 'finder'" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "HyperFN: Hyper+[1-9] to F[1-9], Hyper+0 to F10, Hyper+Hyphen (-) to F11, Hyper+Equal Sign (=) to F12", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "1", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f1" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "2", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f2" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "3", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f3" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "4", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f4" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "5", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f5" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "6", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f6" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "7", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f7" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "8", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f8" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "9", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f9" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "0", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f10" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "hyphen", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f11" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "equal_sign", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift", | |
"left_command", | |
"left_control", | |
"left_option" | |
], | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f12" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "spacefn_mode", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "slash", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "menu" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
}, | |
"devices": [ | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 615, | |
"vendor_id": 76 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "left_command" | |
}, | |
"to": { | |
"key_code": "left_command" | |
} | |
}, | |
{ | |
"from": { | |
"key_code": "left_option" | |
}, | |
"to": { | |
"key_code": "left_option" | |
} | |
} | |
] | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": true, | |
"product_id": 556, | |
"vendor_id": 1452 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [] | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 615, | |
"vendor_id": 1452 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "left_command" | |
}, | |
"to": { | |
"key_code": "left_command" | |
} | |
}, | |
{ | |
"from": { | |
"key_code": "left_option" | |
}, | |
"to": { | |
"key_code": "left_option" | |
} | |
} | |
] | |
} | |
], | |
"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": "Lecion", | |
"selected": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "left_command" | |
}, | |
"to": { | |
"key_code": "left_option" | |
} | |
}, | |
{ | |
"from": { | |
"key_code": "left_option" | |
}, | |
"to": { | |
"key_code": "left_command" | |
} | |
} | |
], | |
"virtual_hid_keyboard": { | |
"caps_lock_delay_milliseconds": 0, | |
"country_code": 0, | |
"keyboard_type": "ansi" | |
} | |
} | |
] | |
} |
Author
lecion
commented
Dec 24, 2017
- 短按 Capslock -> Escape
- Capslock + h/j/k/l -> 左/下/上/右
- Capslock + a/e -> Ctrl + a/e (行首,行尾)
- Capslock + f -> 打开finder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment