0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Ubuntu20.04でLogicoolのトラックボールマウスTM-150rをホイール可能に

Last updated at Posted at 2020-12-16

はじめに

私はLogicoolのトラックボールマウスTM-150rを愛用しています。
Ubuntu20.04でもTM-150rにホイール機能を付けたくて色々調べてたらできたのでメモとして残します。
具体的には、マウスの左ボタンの上部にある小ボタン(左小ボタン)を押しながらカーソル移動でスクロールできるようにしました。

下調べ

まず、以下のコマンドでTM-150rのidを調べました。

$ xinput list

そしたら

↳ Logitech USB Trackball                  	id=11	[slave  pointer  (2)]

と出たので、TM-150-rのidは11だということがわかりました。

次に左小ボタンの番号を特定するために以下のコマンドを打ちました。

まず、マウスは何も押さずに

$ xinput query-state 11

11が先程特定したidです。すると出力は

2 classes :
ButtonClass
	button[1]=up
	button[2]=up
	button[3]=up
	button[4]=up
	button[5]=up
	button[6]=up
	button[7]=up
	button[8]=up
	button[9]=up
ValuatorClass Mode=Relative Proximity=In
	valuator[0]=2427
	valuator[1]=902
	valuator[2]=119
	valuator[3]=833

こんな感じになると思います。すべてupの状態です。次は特定した左小ボタンを押しながらxinput query-state 11を実行して

ButtonClass
	button[1]=up
	button[2]=up
	button[3]=up
	button[4]=up
	button[5]=up
	button[6]=up
	button[7]=up
	button[8]=down
	button[9]=up

となり、8がdownになっていることから左小ボタンの番号は8だとわかりました。

Ubuntuの設定の書き換え

ボタンの特定ができたので、/etc/X11/xorg.confを書き換えをします。
私の場合、xorg.confは未発行だったのでtouchコマンドでxorg.confを作成しました。
作成したらviコマンドで以下に書き換えるだけです。

Section "InputClass"
        Identifier      "Marble Mouse"
        MatchProduct    "Logitech USB Trackball"
        Driver          "libinput"
        Option          "ScrollMethod" "button"
        Option          "ScrollButton" "8"
        Option          "MiddleEmulation" "on"
EndSection

この8が下調べで調べた左小ボタンの番号です。最後にrebootしたら設定完了です。
右小ボタンにしたい場合も同様の手順でボタン番号を特定し、設定できると思います。

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?