いろいろなサイトを参考にして、見様見まねで自分用の設定 jsonを作ってみました。
【2022/05/22】やや機能追加版を作りました。
置き場所 ~/.config/karabiner/assets/complex_modifications
- ctrl-M を return に変換
一部のアプリ(メモとか)で、ctrl-M で改行されなかったので……。 - ctrl-O で 英数/かな 切替え
その昔 Cannaを使っていた癖が抜けきらないので。 - 右Cmd で 英数/かな 切替え
Cannaの呪縛から逃れるため(移行用)
ファイル名: 1.json
{
"title": "自分用",
"rules": [
{
"description": "ctrl-M を return に変換",
"manipulators": [
{ "type": "basic",
"from": { "key_code": "m",
"modifiers": { "mandatory": [ "control" ] }
},
"to": [
{ "key_code": "return_or_enter" }
]
}
]
},
{
"description": "ctrl-O で 英数/かな 切替え",
"manipulators": [
{ "type": "basic",
"from": { "key_code": "o",
"modifiers": { "mandatory": [ "control" ] }
},
"to": [
{ "key_code": "japanese_kana" }
],
"conditions": [
{ "type": "input_source_if",
"input_sources": [ { "language": "en" } ]
}
]
},
{ "type": "basic",
"from": { "key_code": "o",
"modifiers": { "mandatory": [ "control" ] }
},
"to": [
{ "key_code": "japanese_eisuu" }
],
"conditions": [
{ "type": "input_source_if",
"input_sources": [ { "language": "ja" } ]
}
]
}
]
},
{
"description": "右Cmd で 英数/かな 切替え",
"manipulators": [
{ "type": "basic",
"from": { "key_code": "right_command" },
"to": [
{ "key_code": "right_command",
"lazy": true
}
],
"to_if_alone": [
{ "key_code": "japanese_kana" }
],
"conditions": [
{ "type": "input_source_if",
"input_sources": [ { "language": "en" } ]
}
]
},
{ "type": "basic",
"from": { "key_code": "right_command" },
"to": [
{ "key_code": "right_command",
"lazy": true
}
],
"to_if_alone": [
{ "key_code": "japanese_eisuu" }
],
"conditions": [
{ "type": "input_source_if",
"input_sources": [ { "language": "ja" } ]
}
]
}
]
},
{
"description": "かな で 英数/かな 切替え",
"manipulators": [
{ "type": "basic",
"from": { "key_code": "japanese_kana" },
"to": [
{ "key_code": "japanese_eisuu" }
],
"conditions": [
{ "type": "input_source_if",
"input_sources": [ { "language": "ja" } ]
}
]
}
]
}
]
}