artarch
Works Posts Make Category Tags About

Linuxで外付けマウスのみスクロール方向を反転する

Published Jul 20, 2025 by Ato Araki in Computer, 備忘録 at https://blog.artarch.net/notes/linux/mouse-natural-scroll/

Table of Contents

  • 1. マウスの USB ID を確認
  • 2. 設定ファイルを作成
  • 3. 反映方法
  • 4. 動作確認
  • memo: 一時的に適用したい

外付けマウスのスクロールだけ反転させるようにします。

なぜそんなことをしたいかと言うと、 Thinkpad の TrackPoint や、外付けの TrackPoint キーボード、 Tex Yoda のトラックポイントによるスクロール方向はそのまま使用したい、が、 外付けマウスのスクロールは macOS と合わせてナチュラルスクロールにしたいから、となります。

1. マウスの USB ID を確認

$ lsusb | grep Mouse
Bus 003 Device 062: ID 046d:c510 Logitech, Inc. Cordless Mouse

例では 046d:c510 が ID になります。

2. 設定ファイルを作成

$ sudo nano /etc/X11/xorg.conf.d/99-mouse-scroll.conf
Section "InputClass"
    Identifier  "Logicool V500 Cordless Mouse natural-scroll"
    MatchUSBID  "046d:c510"
    MatchIsPointer "on"
    Driver      "libinput"
    Option      "NaturalScrolling" "true"
EndSection

NaturalScrolling を true にするとナチュラルスクロールとなります。

3. 反映方法

X サーバーを再起動するため、GUI のログアウト・ログイン、もしくは再起動を行います。

4. 動作確認

$ xinput list-props "Logitech USB Receiver" | grep -i Natural
        libinput Natural Scrolling Enabled (316):       1
        libinput Natural Scrolling Enabled Default (317):       0

値が 1 なら反転設定が適用されています。

memo: 一時的に適用したい

idを検索

$ xinput list | grep Logitech
⎜   ↳ Logitech USB Receiver                     id=10   [slave  pointer  (2)]

id=10 に対して設定 (ここでの 10 は例です。前の手順で確認した実際のデバイス ID に置き換えてください)

$ xinput set-prop 10 "libinput Natural Scrolling Enabled" 1

See Also

  • ubuntu noble note
  • ubuntu jammy note
  • ubuntu focal note
  • Thinkpad X220
  • 証明書関連tips
  • exif 編集 tips

LastModified: 2025-07-19T15:20:00Z

© 2025 Ato Araki