Karabiner-Elementsでアンダースコアをバックスラッシュへ変換
メモ用:
◇試行錯誤で作成したが、うまく動かないところもあると思います。
◇目的:以下のキーをRemapしたい
・アンダースコア(_)→バックスラッシュ(\)
・Shift + _ → _
・円マーク(¥) → ¥
◇前提:Macbook + 日本語キーボード + Sierra
◇手順:
(1)~/.config/karabiner/assets/complex_modifications/underscore_blackslash.jsonファイルを以下の通りで作成
{
"title": "Exchange underscore to backslash",
"rules": [
{
"description": "Exchange underscore to backslash",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "international1",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "international1"
}
]
},
{
"type": "basic",
"from": {
"key_code": "international1",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "international3"
}
]
},
{
"type": "basic",
"from": {
"key_code": "international3",
"modifiers": {
"optional": [
"caps_lock",
"option"
]
}
},
"to": [
{
"key_code": "international3",
"modifiers": [
"left_option"
]
}
]
}
]
}
]
}
(2)Karabiner-ElementsのComplex Modificationsの画面でRulesをAdd rule