0

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.

  • 1
    Your touch pad is middle-clicking for some reason. – Ignacio Vazquez-Abrams Mar 6 '18 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? – user2084795 Mar 7 '18 at 17:44
  • 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. – Ignacio Vazquez-Abrams Mar 7 '18 at 20:19
  • This solution worked for me unix.stackexchange.com/a/564349/392411 on ubuntu 18.04 – Joshua Opata Jan 27 at 12:07
5

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.