LoginSignup
22
16

More than 5 years have passed since last update.

Karabiner-Elements がついにマウスにも対応してきました!

Last updated at Posted at 2017-10-16

Karabiner-Elements 11.1.8でついにマウス対応開始!

Mouse button modifications has been added.

先日 Karabiner-Elements が超絶怒濤に進化している。今も! を書いたのですが、その時点ではマウスの対応はまだでした。
今回、Karabiner-Elements 11.1.8 (11.2.0 かも?)にてマウスのサポートが開始されました!

私は、logicoolのM705を使ってるので、マウスのボタンの切り替えができる「logicool control center」が有り特に困っていませんでしたが、ついにKarabiner-Elementsがマウスにも対応してきてくれました。
これで、例えばmacOSでMicrosoftの5ボタンマウスを使っても「マウスの戻るボタン」などが有効にできるので選択肢が広がりとてもうれしいです。

現状Macで5ボタンマウスを生かそうとするとmacOS用のドライバを作っているLogicoolかELECOMの2択みたいなので選択肢が広がってとてもハッピーになります:relaxed:
(有料のUSBドライバなどもありますが)

やりたいこと

  • ボタン4 → command + [ に割り当て、戻るボタンとする
  • ボタン5 → command + ] に割り当て、進むボタンとする
  • ボタン6 → control + ↑に割り当て、Mission Controlを起動する

設定ファイル

~/.config/karabiner/assets/complex_modifications/ につくります。

mouse.json
{
    "title": "Mouse Personal rules (@hanamiche).",
    "rules": [
        {
            "description": "Use mouse buttons 4, 5, and 6!!! (available since Karabiner-Elements 11.1.8)",
            "manipulators": [
                {
                    "description": "button4 → [ + command",
                    "from": {
                        "pointing_button": "button4"
                    },
                    "to": [
                        {
                            "key_code": "open_bracket",
                            "modifiers": [ 
                                "command" 
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "description": "button5 → ] + command",
                    "from": {
                        "pointing_button": "button5"
                    },
                    "to": [
                        {
                            "key_code": "close_bracket",
                            "modifiers": [ 
                                "command" 
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "description": "button6 → Mission Control",
                    "from": {
                    "pointing_button": "button6"
                    },
                    "to": [
                        {
                            "key_code": "up_arrow",
                            "modifiers": [ 
                                "control" 
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
    ]
}

button4, button5の to の key_codeを修正しました。 1

まだ、 Version 11.2.0 はbeta版ですが使ってみてはいかがでしょうか。
どんどん便利になっていくので本当に感謝しきれません:clap_tone1::clap_tone1::clap_tone1:

後日談

そしたら、褒められました。
こちらこそ本当にありがとう。とってもうれしいですよ:relaxed:


  1. 私の環境では確かに"[" → close_bracket、 "]" → backslash なのですが・・・ (JISキーボードだから??? :frowning2:

22
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
16