4

I am new to Ubuntu. I recently purchased a Jelly Comb keyboard/touchpad (model: WGJP-110) to use with my computer. I have found the settings for changing the scroll direction on my laptop (Acer Travelmate), but I can't figure out how to reverse the scroll direction on the external touchpad.

3
  • @Carcigenicate I don't see any problem with this question. Asking how to reverse the scroll direction in Ubuntu on a Ubuntu Q&A website is totally normal. Aug 15, 2017 at 19:32
  • 1
    @TimSchumacher The question was migrated from StackOverflow
    – wjandrea
    Aug 15, 2017 at 22:19
  • Oops, that doesn't seem to be shown in the Mobile App. Sorry for the inconvenience. Aug 16, 2017 at 6:22

1 Answer 1

3

If you are using one of the latest Ubuntu releases that uses libinput, you should be able to disable it by using xinput.

Try running these commands in terminal:

  1. xinput list

    This will give you list of devices connected. Find the one you need to change settings on and note its id number.

  2. xinput list-props ID

    Replace ID with the id of your device. This command will give you a list of the device's options. Find the option "Natural Scrolling Enabled" and see if it has 0 or 1 value. 1 means it is active, 0 means it is inactive. You just need to revert it, i.e. set it to 0 if natural scrolling is activated.

  3. xinput --set-prop ID 'libinput Natural Scrolling Enabled' 0

    This will disable natural scrolling on the device. Remember that ID in the example should be replaced with the id of your device.

If this solution works for you, you can make it permanent by adding it into your /usr/share/X11/xorg.conf.d/40-libinput.conf file. Open the file in your preferred text editor, with root privileges. E.g, run:

sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf

You should find content like this:

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
EndSection

The section with pointer in the identifier is for mouse, the section with keyboard is for keyboard, the section with touchpad is for touchpad.

To make it set natural scrolling off by default you just add a line with the option you used in the xinput command after the "Driver" line, in this case Option "NaturalScrolling" "off", so it would look like this:

Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "off"
EndSection

Section "InputClass"
        Identifier "libinput keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "off"
EndSection

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "NaturalScrolling" "off"
EndSection

You can learn about other possible solutions and options here: libinput - Arch Linux Wiki

I do not know drawbacks from directly editing an existing config file, but if you are worried, you might just go for creating a custom .conf file next to "40-libinput.conf". The link above should have all info you need to do that.

You must log in to answer this question.