SUMMARY Add a setting to to disable middle click to paste to increase usability. STEPS TO REPRODUCE 1. Copy text with the mouse. 2. Select a text box or hover over the text box and click middle mouse button. OBSERVED RESULT The contents of the copied text are pasted into the text box. EXPECTED RESULT There should be an option in Systemsettings > Mouse. If enabled, middle clicking on text entry boxes should not paste the content from the clipboard into the text entry box. Note that the middle mouse button should continue working for other purposes, for example to close a tab. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.19.4 KDE Frameworks Version: 5.73.0 Qt Version: 5.15.0 Kernel Version: 5.8.3-arch1-1 OS Type: 64-bit ADDITIONAL INFORMATION I have previously suggested this bug here https://bugs.kde.org/show_bug.cgi?id=374892 and it was suggested i should file this as a bug against Qt, which would affect all Qt applications https://bugreports.qt.io/browse/QTBUG-58087# but as you can see the Qt developers are too lazy to work on this. Thus i am opening it as a new bug against KDE, with the scope being KDE applications and the KDE desktop.
How about this workaround? https://unix.stackexchange.com/a/277488 See also: https://github.com/milaq/XMousePasteBlock
> Thus i am opening it as a new bug against KDE, with the scope being KDE applications and the KDE desktop. For the desktop, you can disable MMB pasting using the Mouse Actions settings. For other applications, see my question at bug 374892 comment 1. If your answer is different, we can investigate, otherwise I can again only refer to upstream.
Marking as needsinfo based on cfeck's question from 3 years ago. Also don't call developers lazy.
(In reply to 2wxsy58236r3 from comment #1) > How about this workaround? > https://unix.stackexchange.com/a/277488 > > See also: > https://github.com/milaq/XMousePasteBlock This particular workaround does not work reliably as it says on the github page.
(In reply to David Edmundson from comment #3) > Marking as needsinfo based on cfeck's question from 3 years ago. > > Also don't call developers lazy. Can you repeat the question here? I'm not sure what you are referring to.
Created attachment 131307 [details] kde mouse settings
(In reply to Christoph Feck from comment #2) > For the desktop, you can disable MMB pasting using the Mouse Actions > settings. No there is no such setting, see the above screenshot.
(In reply to Lukas Ba. from comment #5) > Can you repeat the question here? I'm not sure what you are referring to. Please refer to comment 2 above.
(In reply to 2wxsy58236r3 from comment #8) > (In reply to Lukas Ba. from comment #5) > > Can you repeat the question here? I'm not sure what you are referring to. > > Please refer to comment 2 above. comment 2: > Which text entry box? If this is about the QLineEdit or QTextEdit, then this needs to be added in Qt, but Qt tries to avoid user configurable settings. My answer: All text entry boxes in all KDE applications and the KDE desktop UI.
Already reported as bug 374892. No new information was provided. Please ask in a help forum where to find the Mouse Action settings for the Plasma desktop.
> Please ask in a help forum where to find the Mouse Action settings for the > Plasma desktop. Right-click on the desktop (i.e. wallpaper), and at the bottom you will find a setting to configure the desktop, then you will see the Mouse Action Settings. Is the above correct? Would it be a good idea to expose this configuration menu in the KDE System Settings?
No, because these settings are per desktop view, so you need to select them from there.
(In reply to Christoph Feck from comment #10) > Already reported as bug 374892. No new information was provided. > > Please ask in a help forum where to find the Mouse Action settings for the > Plasma desktop. Oh it seems there was a misunderstanding here, when i said i want to disable the middle mouse to paste on the desktop, i was refering to the whole KDE plasma desktop, including the startmenu, the taskbars, etc., not just the desktop background where you can set a background picture. I apologize for my inconcise wording.
Another example, when i middle mouse click on the taskbar, a sticky notes icon appears.
Doesn't happen here, but reassigning to taskbar component for investigation.
(In reply to Lukas Ba. from comment #14) > Another example, when i middle mouse click on the taskbar, a sticky notes > icon appears. Not a Task Manager issue, but maybe a Panel issue? Regardless, I cannot reproduce. Can you explain exactly what you're doing to get this to happen? A screen recording would help.
Created attachment 131854 [details] screen recording
How bizarre. I cannot reproduce that at all. Middle-clicking on an empty area of the panel or task manager does not paste anything or create a sticky note. I wonder if I'm the weird one for mot being able to make it happen, or if you are affected by some weird bug.
I think this might be related to Manjaro/Arch, see the following discussion: https://archived.forum.manjaro.org/t/notifications-on-plasma-desktop-panels/148102/13
So apparently, this behavior happens if your ~/.config/plasma-org.kde.plasma.desktop-appletsrc file has the text: MidButton;NoModifier=org.kde.paste Under "[ActionPlugins][1]" [ActionPlugins][1] corresponds to the panel, while [ActionPlugins][0] corresponds to the desktop. These defaults are set in desktoppackage/contents/defaults in the plasma-desktop repo. And our default file has the following in it: [Desktop][ContainmentActions] RightButton;NoModifier=org.kde.contextmenu MidButton;NoModifier=org.kde.paste wheel:Vertical;NoModifier=org.kde.switchdesktop [Panel] Containment=org.kde.panel ToolBox=org.kde.paneltoolbox [Panel][ContainmentActions] RightButton;NoModifier=org.kde.contextmenu So by default, we are not turning on this behavior; something else must be doing so. It may be another theme which sets this, and then it gets stuck in your config file forever. That would suck. It would also be a real bug in that it's pretty bad that you can't access a UI to disable this behavior, so once you somehow get stuck with it, it's practically impossible for you to get rid of it. Either way, until this gets fixed, a workaround is to remove " MidButton;NoModifier=org.kde.paste" from the "[ActionPlugins][1]" section of the ~/.config/plasma-org.kde.plasma.desktop-appletsrc file.
> Either way, until this gets fixed, a workaround is to remove " MidButton;NoModifier=org.kde.paste" from the "[ActionPlugins][1]" section of the ~/.config/plasma-org.kde.plasma.desktop-appletsrc file. That worked, maybe rename [ActionPlugins][1] to [ActionPlugins][Taskbar] ?
https://invent.kde.org/plasma/plasma-desktop/-/commit/f596c2cb6fa79ad311149ac20d142380d739c15f indicates that at some point middle-click on the panel was the default. if the configuration is from before that commit that could explains why it is still enabled today
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/640
Git commit 423c1b69909af11a06f58505ccff6d563a6d8006 by Nate Graham. Committed on 04/11/2021 at 02:39. Pushed by ngraham into branch 'master'. Remove middle-click-paste actions from panel config files In the past, panels were configured to add a note on middle-click. This was changed several years ago in https://invent.kde.org/plasma/plasma-desktop/-/commit/f596c2cb6fa79ad311149ac20d142380d739c15f, but the "MiddleButton;NoModifier=org.kde.paste" action was never removed from users' config files, so some people still got this undesirable behavior with no GUI method to change it. This commit adds an update script that removes the config entry that enables this behavior for all of the user's panels. FIXED-IN: 5.24 A +26 -0 desktoppackage/contents/updates/no_middle_click_paste_on_panels.js https://invent.kde.org/plasma/plasma-desktop/commit/423c1b69909af11a06f58505ccff6d563a6d8006
Hopefully that should do it, but I am also looking into disabling or removing that code that reads this setting in the first place, so that even if youe config file gets messed up again somehow, middle-click-paste-on-a-panel-to-create-a-sticky-note won't come back again.
My original bugreport is more far-reaching and not resolved, as it was about middle-click to paste in general, not just the specific effect on the taskbar.
Hmm, since this bug report wound up being used for something else (sorry about that), let's track your original request with Bug 441668.