3
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 5 years have passed since last update.

X11 で natural scrolling を使う

Posted at

xinput を使うと簡単にできます。Arch Linux では pacman -S xf86-input-libinput xorg-xinput でインストールしておいてください。

まず xinput に認識されているデバイスを確認します。xinput list で表示できます。

% xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ ELECOM ELECOM Wireless Mouse              id=8    [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Topre Corporation RealForce Compact       id=9    [slave  keyboard (3)]

自分はマウスとして ELECOM M-BL20DBシリーズ を使っているんですが、それが認識されていることを確認して、xinput で設定可能な項目を確認します。

% xinput list-props 'ELECOM ELECOM Wireless Mouse '
Device 'ELECOM ELECOM Wireless Mouse ':
        Device Enabled (146):   1
        Coordinate Transformation Matrix (148): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Accel Speed (281):     0.000000
        libinput Accel Speed Default (282):     0.000000
        libinput Accel Profiles Available (283):        1, 1
        libinput Accel Profile Enabled (284):   1, 0
        libinput Accel Profile Enabled Default (285):   1, 0
        libinput Natural Scrolling Enabled (286):       0
        libinput Natural Scrolling Enabled Default (287):       0
        libinput Send Events Modes Available (266):     1, 0
        libinput Send Events Mode Enabled (267):        0, 0
        libinput Send Events Mode Enabled Default (268):        0, 0
        libinput Left Handed Enabled (288):     0
        libinput Left Handed Enabled Default (289):     0
        libinput Scroll Methods Available (290):        0, 0, 1
        libinput Scroll Method Enabled (291):   0, 0, 0
        libinput Scroll Method Enabled Default (292):   0, 0, 0
        libinput Button Scrolling Button (293): 2
        libinput Button Scrolling Button Default (294): 2
        libinput Middle Emulation Enabled (295):        0
        libinput Middle Emulation Enabled Default (296):        0
        Device Node (269):      "/dev/input/event0"
        Device Product ID (270):        1390, 163
        libinput Drag Lock Buttons (297):       <no items>
        libinput Horizontal Scroll Enabled (298):       1

この中に「libinput Natural Scrolling Enabled」というのがあるので、これを有効化することで natural scrolling にすることができます。

% xinput set-prop 'ELECOM ELECOM Wireless Mouse ' 'libinput Natural Scrolling Enabled' 1

これは X を起動するときに毎回実行する必要があるので、~/.xinitrc あたりに書いておくといいと思います。

3
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
3
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?