LoginSignup
3
2

More than 5 years have passed since last update.

Karabiner-Elements:ELECOM EX-Gマウスのボタンに機能を割り当ててみた

Last updated at Posted at 2018-01-20

はじめに

ELECOM EX-Gというお気に入りのマウスがあるのですが、ボタンの機能割り当て用の公式アプリがmacOS High Sierraでうまく動かなかったのでKarabiner-Elementsを使って簡単に機能割り当てをしてみました。

割り当てた機能
- ホイールクリック -> Mission Control
- 前方ボタン -> 右の操作スペースに移動
- 後方ボタン -> 左の操作スペースに移動

ソースコード

{
    "title": "Mouse Personal Rules",
    "rules": [
        {
            "description": "Use mouse button 3, 4, and 5",
            "manipulators": [
                {
                    "description": "button3 -> control + ↑",
                    "from": {
                        "pointing_button": "button3"
                    },
                    "to": [
                        {
                            "key_code": "up_arrow",
                            "modifiers": [
                                "left_control"
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "description": "button4 -> control + ←",
                    "from": {
                        "pointing_button": "button4"
                    },
                    "to": [
                        {
                            "key_code": "left_arrow",
                            "modifiers": [
                                "left_control"
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "description": "button5 -> control + →",
                    "from": {
                        "pointing_button": "button5"
                    },
                    "to": [
                        {
                            "key_code": "right_arrow",
                            "modifiers": [
                                "left_control"
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
    ]
}

基本的にはpointing_buttonkey_codeおよびmodifiersのペアを一対一で割り当てるだけなのでとっても簡単です。
key_codeはKarabiner-EventViewerで調べてください。

こちらを適当な名前をつけたjsonファイルにして、~/.config/karabiner/assets/complex_modificationsに突っ込めばKarabiner-Elementsで選択できるようになります。

3
2
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
3
2