Skip to content

Instantly share code, notes, and snippets.

@songouyang
Last active November 26, 2025 07:07
Show Gist options
  • Select an option

  • Save songouyang/60630494c8288b6ddc36710f4209674e to your computer and use it in GitHub Desktop.

Select an option

Save songouyang/60630494c8288b6ddc36710f4209674e to your computer and use it in GitHub Desktop.
karabiner elements 自定义切换输入法规则
{
"global": {
"check_for_updates_on_startup": false,
"show_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"rules": [
{
"description": "短按left_shift切换中英文",
"manipulators": [
{
"from": {
"key_code": "left_shift",
"modifiers": { "optional": ["any"] }
},
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 250,
"basic.to_if_held_down_threshold_milliseconds": 250
},
"to": [
{
"key_code": "left_shift",
"lazy": true
}
],
"to_if_alone": [
{
"hold_down_milliseconds": 10,
"key_code": "f18"
}
],
"to_if_held_down": [{ "key_code": "left_shift" }],
"type": "basic"
}
]
}
]
},
"devices": [
{
"identifiers": { "is_keyboard": true },
"simple_modifications": [
{
"from": { "key_code": "caps_lock" },
"to": [{ "key_code": "left_control" }]
}
]
}
],
"name": "Default profile",
"selected": true,
"virtual_hid_keyboard": { "keyboard_type_v2": "ansi" }
}
]
}
@songouyang
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment