Karabiner-Elements が単純な置き換えしかできなかった頃に HammerSpoon で頑張ってやっていた、右Command+A-L キーでのデスクトップ切り替えを Karabiner-Elements でやるようにしてみた。
というのも、HammerSpoon での私の書き方が悪いのか、たまに修飾キーが押されっぱなしになってしまい単純に A だけ押した時とかにもデスクトップが切り替わってしまうことがあり地味にストレスが溜まっていたので…。
前からやろうやろうと思ってたんだけど Karabiner-Elements の json を書くのがダルいのを言い訳に放置してたんだけど、最近肩こりがアレなので久し振りに Kinesis を取り出してきてキー配置の設定とかしているのでそのついでに↓のを ~/.config/karabiner/karabiner.json
に書き足して、HammerSpoon 側の処理をコメントアウトして終わり。
これで暫く使ってみて、修飾キーが押されっぱなしになるのが解消されると良いなぁ。
{
"description": "Use Command_R+[ASD FGH JKL] for MissionControl",
"manipulators": [
{
"from": {
"key_code": "a",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "1",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "s",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "2",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "d",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "3",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "f",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "4",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "g",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "5",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "h",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "6",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "j",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "7",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "k",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "8",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
},
{
"from": {
"key_code": "l",
"modifiers": {
"mandatory": [
"right_command"
]
}
},
"to": [
{
"key_code": "9",
"modifiers": [
"right_command",
"right_control",
"right_shift",
"right_option"
]
}
],
"type": "basic"
}
]
}