stylesheet

2020-04-11

Ubuntu 18.05 マウスの中ボタンクリックエミュレーション

左右ボタンクリックで中ボタンクリックとする機能。昔はGUIで設定できた気がしたのだが...

# /usr/share/X11/xorg.conf.d/99-mydev.conf

Section "InputClass"
    Identifier "Kensington Orbit Trackball with Scroll Ring"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    MatchUSBID "047d:2048"
    Driver "evdev"
    Option "Emulate3Buttons" "True"
    Option "Emulate3Timeout" "50"
EndSection

Match*でデバイスを絞り込んで、オプションを追加している。Emulate3Buttonsフラグで中ボタンエミュレーション。Emulate3Timeoutはしきい値。

デバイスIDを調べるにはlsusbを、ボタンIDを調べるのはxevを使用するとよい。evdevドライバで使えるオプションはman evdevに記載されているので参照されたし。