7
7

More than 5 years have passed since last update.

Linux でトラックボールを設定する

Posted at

標準でも最低限の操作はできるが、ボタンの個別割当とスクロールをやりたい

Linux Mint 18.3 Cinnamon
Kensington Expert Mouse 5

libinput で設定する
https://wiki.archlinux.jp/index.php/Libinput
https://www.mankier.com/4/libinput

IDを調べる

$ lsusb
Bus 002 Device 004: ID 047d:1015 Kensington Expert Mouse

ボタンの番号を調べる

xev と入力すると小さなウィンドゥが出てくるので、調べたいボタンを押せばよい

$ xev
...
ButtonPress event, serial 35, synthetic NO, window 0x7000001,
    root 0x1eb, subw 0x7000002, time 570051, (34,47), root:(896,1142),
    state 0x0, button 3, same_screen YES
...
ボタン配置
+-------+
| 2 | 8 |
|--( )--|
| 1 | 3 |
+-------+

設定ファイル

左手で操作するので左右のボタンを入れ替えている

/usr/share/X11/xorg.conf.d/30-kensington.conf

Section "InputClass"
    Identifier  "Kensington Expert Mouse"
    MatchUSBID  "047d:1015"
    Driver      "libinput"
    MatchDevicePath "/dev/input/event*"
    Option      "ButtonMapping" "3 2 1 4 5 6 7 8 9"

    Option      "ScrollMethod"  "button"
    Option      "ScrollButton"  "2"

EndSection
$ xinput list # id を調べる
Kensington USB/PS2 Expert Mouse  id=13
$ xinput list-props 13 # 設定内容の表示

トグルスクロールの設定

上の設定ファイルだと、ボタン2(左上)をクリックしている間だけドラッグモードになる
トグル的な感じでモード切り替えができないかと思って DragLockButtons を設定したら Linux が起動できなくなってしまった
もしうまくいく設定がわかる人がいたら教えてほしい

ダメ
        Option      "DragLockButtons"  "2 2"
7
7
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
7
7