korechi’s diary

とあるVR/ARエンジニアのブログ

Macで5ボタンマウスを使って”進む””戻る”をかんたんにやる

Windowsだとすんなり”進む戻る”ボタンが適応されるんだけど、なぜかMacだとすんなりいかない。。
そこで調べたらKarabinerを使えば解決しました!
Karabinerほんと使えるなー。これでますますOS Sierraにできなくなっちゃった 笑
1. Karabinerをインストール
2. Preferences -> Misc & Uninstall -> Open private.xml を選択
f:id:korechi:20161020133207p:plain 3. private.xml をなんかのエディタで開いて下のコードを上書き

<?xml version="1.0"?>
<root>
    <list>
        <item>
            <name>MouseButton 4 and 5</name>
            <identifier>remap.mouse_button4_5</identifier>
            <autogen>
                --PointingButtonToKey-- PointingButton::BUTTON4,
                KeyCode::JIS_BRACKET_LEFT, ModifierFlag::COMMAND_L
            </autogen>
                <autogen>
                    --PointingButtonToKey-- PointingButton::BUTTON5,
                    KeyCode::JIS_BRACKET_RIGHT, ModifierFlag::COMMAND_L
                </autogen>
        </item>
    </list>
</root>

もとに書いてある3行程度のコードを消して挿入するように
4. Change Key -> Reload XML を選択
5. Change Key -> MouseButton 4 and 5 にチェックを入れる
f:id:korechi:20161020133359p:plain