Skip to content

Instantly share code, notes, and snippets.

@kxccc
Last active September 16, 2023 19:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
{
"title": "Switch input source | 输入法切换",
"rules": [
{
"description": "Tap ESC → Switch input source to English | 短按 ESC → 切换到英文输入法",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_unless"
}
],
"from": {
"key_code": "escape",
"modifiers": {
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "escape",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "f18"
}
],
"to_if_held_down": [
{
"key_code": "escape"
}
],
"type": "basic"
},
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_if"
}
],
"from": {
"key_code": "escape",
"modifiers": {
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "escape",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "vk_none"
}
],
"to_if_held_down": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"description": "Tap Shift_L (⇧) → Switch input source (F18) | 短按左 Shift (⇧) → 切换输入法",
"manipulators": [
{
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "left_shift"
}
],
"to_if_alone": [
{
"key_code": "f18"
}
],
"to_if_held_down": [
{
"key_code": "left_shift"
}
],
"type": "basic"
}
]
}
]
}
@kxccc
Copy link
Author

kxccc commented Sep 16, 2023

karabiner://karabiner/assets/complex_modifications/import?url=json url

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