Last active
November 30, 2018 04:26
-
-
Save critical-bug/3bcfe741c7be69ae22dbd2cb48c5ad55 to your computer and use it in GitHub Desktop.
Change the keyboard layout deterministically with command+shift key etc.
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
{ | |
"title": "コマンド キー による日本語入力の切り替え", | |
"rules": [ | |
{ | |
"description": "右コマンドキーを単体で押したときに、かなキーを送信する。", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "right_command" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_kana" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "左コマンドキーを単体で押したときに、英語 (US) キーボードに切り替える", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"select_input_source": { | |
"input_source_id": "^com\\.apple\\.keylayout\\.US$" | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "左コマンドキーを単体で押したときに、英語 (Dvorak) キーボードに切り替える", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_command", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_command" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"select_input_source": { | |
"input_source_id": "^com\\.apple\\.keylayout\\.Dvorak$" | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "左コマンド + 左シフト を押したときに、かなキーを送信する。", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"mandatory": [ "left_command" ] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift", | |
"modifiers": [ "left_command" ], | |
"lazy": true | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "japanese_kana" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment