Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

  1. #1
    Join Date
    Dec 2009
    Beans
    26

    Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    I'm a new Linux user running Ubuntu 20.04 on a Lenovo Thinkpad t410. I'm looking to change the behavior of the two buttons below the thinkpad's touchpad. I'd like them to match the functions of the upper two buttons and basically operate as left/right mouse buttons. The Ubuntu settings don't address those bottom buttons. Someone on another forum suggested I try gnome tweaks, but that didn't provide any controls for those buttons either. If anyone can point me in the right direction for a solution, I'd appreciate it.


  2. #2
    Join Date
    Dec 2014
    Beans
    1,741

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    With Ubuntu 20.04 you have the choice between running with the newer, supposedly faster Wayland or the older X11, which has a lot more features (which is the reason Wayland is supposed to be faster, it leaves out everything that isn't used by the majority of modern applications). You should be able to choose the kind of graphical session you want to run on the login screen.

    If you're using Wayland, I believe (but can't be sure, I'm using XUbuntu and the XFCE Desktop doesn't yet run on Wayland) the graphical setting utilities are all there is and if there are no options for your buttons then that's it.

    If you're running in X11 there are things you can try outside of the graphical tools. Open a terminal (either from 'Activities' or with the key combination ctrl-alt-t) and enter
    Code:
    xinput --list
    You should get output similar to this
    Code:
    ⎡ Virtual core pointer                        id=2    [master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
    ⎜   ↳ ETPS/2 Elantech Touchpad                    id=13    [slave  pointer  (2)]
    ⎜   ↳ USB Optical Mouse                           id=9    [slave  pointer  (2)]
    ⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
        ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
        ↳ Video Bus                                   id=7    [slave  keyboard (3)]
        ↳ Power Button                                id=8    [slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard                id=12    [slave  keyboard (3)]
    The interesting thing is obviously the line for your touchpad (mine is an 'ETPS/2 Elantech Touchpad', a simple pad with just two hardware buttons)
    So let's get some details about the pad
    Code:
    xinput --list 'ETPS/2 Elantech Touchpad'
    Substitute the name of your pad as given by the previous command for 'ETPS/2 Elantech Touchpad'. The quotes around the name are important, otherwise the shell will split the name into separate words and xinput will not find the device. You will get output that starts similar to this:
    Code:
    ETPS/2 Elantech Touchpad                    id=13    [slave  pointer  (2)]
        Reporting 7 classes:
            Class originated from: 13. Type: XIButtonClass
            Buttons supported: 7
            Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
            Button state:
    There's a lot more after that part, but it's not relevant to what we're trying to do. So my simple two buttons 'magically' turn into seven ... actually the "Button Middle" is left and right together and presses of all the "Wheel"-buttons are generated by the scrolling gestures. If the additional buttons on your pad can be seen by libinput, your 'Buttons supported:'-line should give 9 or possibly more and you should have some additional 'Button labels', too. If that's the case, let's find out the numbers for those buttons. Hold one of the buttons and repeat the previous command (you can use the "cursor up" and "cursor down" keys to go through old commands in the shell; press 'cursor up' once then hit enter). The output should be the same except for the 'Button state:' line. The number for any buttons on the pad held during the execution of the command should be printed there. Remember that number and repeat the procedure with the other button. So now you have numbers for lower left and lower right buttons (probably 8 and 9).

    You can now remap those buttons with
    Code:
    xinput --set-button-map 'ETPS/2 Elantech Touchpad' 1 2 3 4 5 6 7 1 3
    Remember to replace the name of your touchpad for the name of mine in that command. The list of numbers at the end is one number for each button the pad has. So button 1 through 7 produce their actual button but button 8 should be considered the same as 1 and button 9 is the same as 3. Since my pad doesn't have additional buttons I could only test it on my mouse - which has - and there it worked. Change that list as needed depending on the numbers reported for your additional buttons.

    Once you've got a command that works, you'll need to make this command run automatically after you log in. There are multiple way to do this depending on the Desktop Environment you use. In XFCE I can just go into "Settings"->"Startup and Session" and add the command to run. I'm not sure how Gnome handles this. In the worst case you'll have to write a .desktop file and put it in ~/.config/autostart/.

    Holger

  3. #3
    Join Date
    Dec 2009
    Beans
    26

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    Holger,

    Thank you so much for the detailed post and the help. I just read it, and I'm going to embark on following the instructions. I'm VERY new to the linux world, so much of what you're talking about it going over my head--for now--but I'm going to give it a close read and learn what I can. I may be back with more questions! But really, thanks for taking the time.

    Dutch

  4. #4
    Join Date
    Nov 2009
    Beans
    Hidden!
    Distro
    Kubuntu 18.04 Bionic Beaver

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    well first thing is - identify you touchpad

    mine is synaptics and at first tehre seems like no further settings are available. but only a small package is then added and suddenly all touchpad settings are available in system settings and they kind of look like in windows. so first things first - identify, then we might find a GUI and if there really is no GUI one can edit config files.

    once my Fn key was acting up so i set my windows key as FN key. problem solved.
    Read the easy to understand, lots of pics Ubuntu manual.
    Do i need antivirus/firewall in linux?
    Full disk backup (newer kernel -> suitable for newer PC): Clonezilla
    User friendly full disk backup: Rescuezilla

  5. #5
    Join Date
    Dec 2009
    Beans
    26

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    Holger, I got pretty far with your instructions, but I hit a snag. When I select buttons and re-execute the list command (which, in my case reads: "xinput --list 'SynPS/2 Synaptics TouchPad'), only two of the buttons return a number--it's those bottom two buttons I'm trying to alter, and they both register as "2." None of the other buttons show any button state when I try it with them. So I'm not sure where to go next. Any thoughts would be appreciated!

    Thanks
    Dutch

  6. #6
    Join Date
    Dec 2009
    Beans
    26

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    Quote Originally Posted by mastablasta View Post
    well first thing is - identify you touchpad

    mine is synaptics and at first tehre seems like no further settings are available. but only a small package is then added and suddenly all touchpad settings are available in system settings and they kind of look like in windows. so first things first - identify, then we might find a GUI and if there really is no GUI one can edit config files.

    once my Fn key was acting up so i set my windows key as FN key. problem solved.
    Thanks for your note. My touch pad is 'SynPS/2 Synaptics TouchPad'.
    Last edited by dutchg; March 18th, 2021 at 03:39 PM. Reason: to include quote

  7. #7
    Join Date
    Dec 2014
    Beans
    1,741

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    Please run this command
    Code:
    dpkg -l 'xserver-xorg-input-*'|grep '^ii'
    to check what driver for the touchpad is installed on your system. There are two, the newer libinput and the older synaptics. 'libinput' was written from the ground up as a framework for all kinds of input devices with extensibility as one goal and I assumed you were using this since it's the default on all newer versions of Ubuntu. 'synaptics' started out as a driver for one specific touchpad and was extended over a long time to cover a lot more. It still has quite a few options that libinput doesn't have yet, but I can't find an option to remap buttons for a device. If you're using synaptic, we might end up remapping the buttons using 'xmodmap --pointer', which will remap the buttons of all pointing devices. Not a problem if you're only using the touchpad, but if you're also using a mouse with additional buttons it would remap those, too.

    Holger

  8. #8
    Join Date
    Dec 2009
    Beans
    26

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    Hi Holger,

    Here's the output of that command:

    Code:
    ii xserver-xorg-input-all    1:7.7+19unbuntu14    amd64    X.Org X server -- input driver metapackage
    ii xserver-xorg-input-libinput    0.29.0-1    amd64    X.Org X server -- libinput driver metapackage
    ii xserver-xorg-input-wacom    1:0.39.0-0ubuntu1    amd64    X.Org X server -- Wacom input driver

  9. #9
    Join Date
    Dec 2014
    Beans
    1,741

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    The Wacom driver is for graphic tablets made by Wacom and possibly some other similar devices, so if you've got one of those connected that would explain why it's installed. Otherwise you do seem to be using libinput. I don't understand why the '--list' option prints the state for both the additional buttons as '2' (middle button, normally). Perhaps it's not printing physical buttons but the logical buttons assigned to them ? Let's check:
    Code:
    xinput --get-button-map 'SynPS/2 Synaptics TouchPad'
    This should print a list of the all logical button numbers for each physical button, so for my pad it prints '1 2 3 4 5 6 7'.

    Holger

  10. #10
    Join Date
    Dec 2009
    Beans
    26

    Re: Ubuntu control bottom two buttons on Thinkpad t410 touchpad?

    That command returns the same for me: '1 2 3 4 5 6 7'.

    I don't use a Wacom tablet, so I'm not sure why that's installed. I most often use the laptop without a mouse, but sometimes I do have a mouse connected. As far as I know this is a stock install of Ubuntu 20.04. I'm a real beginner with Linux. Overall, it's running great on the old Thinkpad, though, which I use mostly as a writing machine. Anyway, it'll be great if I can get control of these touchpad buttons. Thanks again for your help.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •