Last active
October 27, 2022 06:09
-
-
Save scottming/e6199cea58fa787b17dac1d4af31f43c 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.simultaneous_threshold_milliseconds": 50, | |
"basic.to_delayed_action_delay_milliseconds": 500, | |
"basic.to_if_alone_timeout_milliseconds": 300, | |
"basic.to_if_held_down_threshold_milliseconds": 500, | |
"mouse_motion_to_scroll.speed": 100 | |
}, | |
"rules": [ | |
{ | |
"description": "caps_lock -> ctrl/esc(if_alone).", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "escape" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "capslock+q -> cmd+h", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "q", | |
"modifiers": { | |
"mandatory": ["left_control"], | |
"optional": "any" | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "h", | |
"modifiers": ["left_command"] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "switch \\ and |", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "backslash", | |
"modifiers": { | |
"mandatory": ["left_shift"], | |
"optional": "any" | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "backslash" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "backslash" | |
}, | |
"to": [ | |
{ | |
"key_code": "backslash", | |
"modifiers": ["left_shift"] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "ctrl+b -> left, ctrl+f -> forward, ctrl+n -> down, ctrl+p -> up", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^dev.warp.Warp-Stable", | |
"^org.alacritty", | |
"^com.googlecode.iterm2" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "b", | |
"modifiers": { | |
"mandatory": ["left_control"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^dev.warp.Warp-Stable", | |
"^org.alacritty", | |
"^com.googlecode.iterm2", | |
"^com.readdle.PDFExpert-Mac" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "n", | |
"modifiers": { | |
"mandatory": ["left_control"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "down_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^dev.warp.Warp-Stable", | |
"^org.alacritty", | |
"^com.googlecode.iterm2" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "p", | |
"modifiers": { | |
"mandatory": ["left_control"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "up_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^dev.warp.Warp-Stable", | |
"^org.alacritty", | |
"^com.googlecode.iterm2" | |
], | |
"type": "frontmost_application_unless" | |
} | |
], | |
"from": { | |
"key_code": "f", | |
"modifiers": { | |
"mandatory": ["left_control"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^dev.warp.Warp-Stable", | |
"^org.alacritty", | |
"^com.googlecode.iterm2" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "f", | |
"modifiers": { | |
"mandatory": ["left_control", "left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_arrow", | |
"modifiers": ["left_option"] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^dev.warp.Warp-Stable", | |
"^org.alacritty", | |
"^com.googlecode.iterm2" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "b", | |
"modifiers": { | |
"mandatory": ["left_control", "left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_arrow", | |
"modifiers": ["left_option"] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
}, | |
"devices": [ | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 627, | |
"vendor_id": 1452 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [] | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"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" | |
} | |
] | |
} | |
], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 6168, | |
"vendor_id": 1241 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "right_control" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": false, | |
"product_id": 17, | |
"vendor_id": 1130 | |
}, | |
"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": 8705, | |
"vendor_id": 4617 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": false, | |
"simple_modifications": [] | |
}, | |
{ | |
"disable_built_in_keyboard_if_exists": false, | |
"fn_function_keys": [], | |
"identifiers": { | |
"is_keyboard": true, | |
"is_pointing_device": true, | |
"product_id": 8705, | |
"vendor_id": 4617 | |
}, | |
"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": 832, | |
"vendor_id": 1452 | |
}, | |
"ignore": false, | |
"manipulate_caps_lock_led": true, | |
"simple_modifications": [ | |
{ | |
"from": { | |
"key_code": "right_command" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control" | |
} | |
] | |
} | |
] | |
} | |
], | |
"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": "Scott's profile", | |
"parameters": { | |
"delay_milliseconds_before_open_device": 1000 | |
}, | |
"selected": true, | |
"simple_modifications": [], | |
"virtual_hid_keyboard": { | |
"caps_lock_delay_milliseconds": 0, | |
"country_code": 0, | |
"indicate_sticky_modifier_keys_state": true, | |
"keyboard_type": "ansi", | |
"mouse_key_xy_scale": 100 | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sublime 里面 cmd + K cmd + 6 缩小后进行修改