• Disabling middle click paste

    Home » Forums » AskWoody support » Linux for the Home user » Linux – all distros » Disabling middle click paste

    Author
    Topic
    #2447676

    After Windows 11 made an appearance I decided to give Linux another go with a more open mind. I settled on Kubuntu but I can’t get my head around the whole “middle click paste” thing. For those of you who don’t know, highlighting text will automatically copy it to a clipboard-style buffer. It can then be pasted by pressing the middle mouse button or wheel. I often find myself highlighting text for clarity or as a “this is important” when reading something. So I don’t want that text being unexpectedly pasted into a text field if I’m using autoscroll.

    The thing is, I can’t see any way of disabling this globally. It can be done for GNOME applications. I’ve looked around and all I can find is the following (the top two are direct quotes):

    • Why would you want to do this?
    • It’s fundamental to Unix/X11 so learn to use your computer properly
    • Recompile your own instance of Wayland without it
    • Disable the middle button completely
    • Use a background shell script to intercept it and disable it on the fly

    Is that really it?

    To be honest, for a system which prides itself on customisation, the inability to properly disable this is kind of putting me off taking it any further.

    Viewing 3 reply threads
    Author
    Replies
    • #2447969

      Yeah that is a big problem…  There may be help in answer on this page about globally disabling paste. Also please look at this page particularly answer using xinput. Sometimes your fix is a hack…

      (Recompiling the X 11 Server or Wayland takes a tutorial, and not reasonable solution for a end user. :<)

      Perhaps another user who well versed with KDE may be able to help.

      Are you willing to try a different window management system?

       

    • #2536942
    • #2537213

      I just tested it, it works! At least in the current release of KDE Neon. Doesn’t seem to be in Kubuntu yet.

      Edit ~/.config/kwinrc and add the following to the [Wayland] section (create it if it doesn’t exist):

      EnablePrimarySelection=false
      Log off and back on again and it’s all good! This changes everything for me. 🙂

      Edit: It can also be done in System Settings > Workspace Behaviour, uncheck “Paste selected text”.

    • #2537662

      It doesn’t seem to work for XWayland so that still needs a script hack by the way.

    Viewing 3 reply threads
    Reply To: Disabling middle click paste

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: