MacOS Karabiner-Elements で英数/かな トグル
以前に ⌘英かな + Karabiner-Elements で「英数」キーと「かな」キーで日本語入力の切り替えトグルを実現していたが Karabiner-Elements のアップデートで、Karabiner-Elements単体でのトグルと、アプリケーション切り替えが利用可能になっていた
Windowsへのリモートデスクトップでは、USキーボードの問題から別の定義を作成したので、frontmost_application_unless を用いて除外
kanatoggle.json
※RDPの説明と画像が兼用なのをご了承ください
既に Karabiner-Elements を設定して利用している場合、Profilesから新しいプロファイルを作成してお試しください
Windowsへのリモートデスクトップでは、USキーボードの問題から別の定義を作成したので、frontmost_application_unless を用いて除外
kanatoggle.json
{
"title": "日本語入力トグル",
"rules": [
{
"description": "英数トグル",
"manipulators": [
{
"type": "basic",
"description": "入力ソースが英字の場合、かなへ変更(RDP以外)",
"from": {
"key_code": "japanese_eisuu"
},
"to": [
{
"key_code": "japanese_kana"
}
],
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
},
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.microsoft\\.rdc\\.",
"^com\\.2X\\.Client\\.Mac"
]
}
]
}
]
},
{
"description": "かなトグル",
"manipulators": [
{
"type": "basic",
"description": "入力ソースがひらがなの場合、英数へ変更(RDP以外)",
"from": {
"key_code": "japanese_kana"
},
"to": [
{
"key_code": "japanese_eisuu"
}
],
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ja"
}
]
},
{
"type": "frontmost_application_unless",
"bundle_identifiers": [
"^com\\.microsoft\\.rdc\\.",
"^com\\.2X\\.Client\\.Mac"
]
}
]
}
]
}
]
}
※RDPの説明と画像が兼用なのをご了承ください
既に Karabiner-Elements を設定して利用している場合、Profilesから新しいプロファイルを作成してお試しください
- Karabiner-Elements のデータフォルダを開いて

- assets/complex_modifications に 上記の kanatoggle.json (UTF-8 であればファイル名は何でもよい)を作成またはコピペ

- Add rule を開いて

- 日本語入力トグルの Enable All で取り込む
jsonが正しくない場合ココに表示されません
- 取り込まれて利用可能になるハズ

※jsonファイルを変更した時は、ここで Removeの後、再度取り込む必要があります
コメント