2

Whenever I use the touch pad to scroll with two fingers, some lines of text in the current window are copy-pasted. This happens very rarely (maybe once a week).

I am certain that this is not caused by interaction with the context menu (which provides a copy paste option) because I never see a context window and the mouse cursor had to move very quickly to not notice a quickly disappearing window. Moreover, when I switch to a text box after this happens, the clipboard is still the same as before.

The reason I am blaming the touch pad (driver?) is that I only ever saw the issue when using the touch pad.

I am using Fedora 27 on a P51 Lenovo Think Pad.

5
  • 1
    Your touch pad is middle-clicking for some reason. Mar 6, 2018 at 16:34
  • That sounds very plausible. Any idea how to specifically disable the middle-click or would that be a bug of the driver? Mar 7, 2018 at 17:44
  • 1
    If you install xorg-x11-drv-synaptics-legacy then you should be able to set the options for the synaptics(4) driver via xorg.conf or udev. Mar 7, 2018 at 20:19
  • This solution worked for me unix.stackexchange.com/a/564349/392411 on ubuntu 18.04 Jan 27, 2020 at 12:07
  • Easiest way is just to disable Tap-to-click under device settings.
    – holmberd
    Mar 26, 2022 at 18:08

2 Answers 2

12

Because you say that "it happens very rarely (maybe once a week)" when you "scroll with two fingers", I suspect that during those times, you did a three finger tap on the touch pad which (in most cases) is registered as a middle-click causing the contents of the clipboard to be pasted.

You can disable that using the following two steps:

  1. Identify the Touch pad device ID:

    From a command prompt, enter: xinput list

    This should list all the recognized xinput devices with their IDs. Sample output is shown below for reference:

    ⎡ Virtual core pointer                      id=2    [master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
    ⎜   ↳ ELAN Touchscreen                          id=12   [slave  pointer  (2)]
    ⎜   ↳ SynPS/2 Synaptics TouchPad                id=15   [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)]
        ↳ Video Bus                                 id=7    [slave  keyboard (3)]
        ↳ Video Bus                                 id=8    [slave  keyboard (3)]
        ↳ Power Button                              id=9    [slave  keyboard (3)]
        ↳ Sleep Button                              id=10   [slave  keyboard (3)]
        ↳ Integrated Webcam: Integrated W           id=11   [slave  keyboard (3)]
        ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]
    

    In the above example, the touch pad is SynPs/2 Synaptics TouchPad with id=15.

  2. Disable the middle click action on the touchpad:

    From a shell/command-prompt enter: xinput set-button-map 15 1 0 3

    Explanation: The format of the above command is: xinput set-button-map <device-id> <left-button-action> <middle-button-action> <right-button-action>

    In this case, 15 is the ID of the device, and then the 3 numbers following the device ID represents the action for the left, middle and right button on the device in order. By setting action 1 for the left button, we are mapping it to the left click action. By setting action 0 for the middle button, we are disabling it and similarly setting action 3 for the right button we are mapping it to the right click action.

Hope that solves your problem and others's who end up on this page.

0

This worked very well for me. It disables the three fingers paste.

From command line:

gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

To re-enable the functionality:

gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true

I am using Ubuntu 20.04.5 LTS on a System76 laptop.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .