karabiner-elements(12.0.0)を使って1keyで日本語入力をtoggleする方法
karabiner-elementsの12.0.0
を使って、1keyで日本語入力をtoggleする方法。
設定
以下を ~/.config/karabiner/assets/complex_modifications/custom.json
として保存
{ "title": "Japanese input config", "rules": [ { "description": "Toggle input source by right command", "manipulators": [ { "conditions": [ { "type": "input_source_unless", "input_sources": [ { "language": "ja" } ] } ], "type": "basic", "from": { "key_code": "right_command", "modifiers": { "optional": [ "any" ] } }, "to": [ { "key_code": "right_command" } ], "to_if_alone": [ { "key_code": "japanese_kana" } ] }, { "conditions": [ { "type": "input_source_if", "input_sources": [ { "language": "ja" } ] } ], "type": "basic", "from": { "key_code": "right_command", "modifiers": { "optional": [ "any" ] } }, "to": [ { "key_code": "right_command" } ], "to_if_alone": [ { "key_code": "japanese_eisuu" } ] } ] } ] }
Preferences -> Complex Modifications の RulesタブからAdd rule
を選択して、Japanese input config
のToggle input source by right command
をEnableする。
あとは、Right Commandを使うことで英数 <-> かな
のtoggleができるはず。