Bug 356748 - Clipboard ignores "Synchronize contents of the clipboard and selection"
Summary: Clipboard ignores "Synchronize contents of the clipboard and selection"
Alias: None
Product: klipper
Classification: Unclassified
Component: plasma-widget (show other bugs)
Version: 5.5.0
Platform: Fedora RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Martin Flöser
Depends on:
Reported: 2015-12-15 18:23 UTC by Sudhir Khanger
Modified: 2017-06-06 11:56 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:

screencast showing the problem (527.34 KB, video/mp4)
2015-12-15 18:25 UTC, Sudhir Khanger

Note You need to log in before you can comment on or make changes to this bug.
Description Sudhir Khanger 2015-12-15 18:23:59 UTC
Synchronize contents of the clipboard and selection setting is being ignored. If you make a selection it lands up in clipboard manager.

Another thing I noticed is that although this is in clipboard but it can't be pasted. If you want to paste it then you will have to to Ctrl+C and then Ctrl+V.

Passwords can get copied and seen so by other users so clipboard should not automatically add every selection to the clipboard widget unless a user explicitly enabled it by checking "Synchronize contents of the clipboard and selection."

Reproducible: Always

Steps to Reproduce:
1. Disabled Synchronize contents of the clipboard and selection.
2. Make a selection.

Actual Results:  
Selection is copied to clipboard widget even when it is disabled via unchecking Synchronize contents of the clipboard and selection.
Comment 1 Sudhir Khanger 2015-12-15 18:25:13 UTC
Created attachment 96098 [details]
screencast showing the problem
Comment 2 Martin Flöser 2015-12-16 07:27:31 UTC
sorry, but you misunderstood the feature. The synchronize is about making the selection available in ctrl+v and ctrl+c in the selection. The clipboard manager lists all clipboard entries whether it's from the selection or ctrl+C/v
Comment 3 Fredy Neeser 2015-12-16 19:07:26 UTC
I tried out the "Synchronize contents of the clipboard and the selection" setting myself.  I understand what it does:

If disabled, a word selected by double click (for example in Kwrite) will get pasted by a middle mouse button click, but not by entering ctrl+v.
If enabled, a word selected by double click will still get pasted by a middle mouse button click, but in addition also by entering ctrl+v.

However, I see two problems with enabling the "Synchronize contents of the clipboard and the selection" feature:

Problem 1.  It defeats a frequent clipboard use case, where a user does the following:
1.  Add a first word to the clipboard by selecting it with the mouse and then doing ctrl+c or Edit > Copy via the application menu.
2.  Select a second word (to be replaced) with the mouse, for example, by double-clicking it.
3.  (Try to) Replace the second word with the first word by entering ctrl+v.
But Step 3. doesn't do what it's expected to do because step 2 replaced the front entry of the clipboard with the second word itself.
==>  I have to disable "Synchronize contents of the clipboard and the selection" because the above clipboard use case is important to me.

Problem 2: The name of the feature "Synchronize contents of the clipboard and the selection" is not self explanatory because most users know that entering ctrl+v  versus  clicking the middle mouse button traditionally has different (also complementary) effects.  Moreover, the description of the feature in
is unclear and incomplete.  It should say  "If this option is selected, then the selection and the clipboard is kept the same, so that anything in the selection is immediately available for pasting elsewhere using any method such as entering ctrl+v or clicking the traditional middle mouse button."  (The important difference being the ability to paste using ctrl+v)

Based on a long thread on the Fedora KDE mailing list (see "klipper in Fedora 23 *argh*"), it's clear that this is not an intuitively clear or useful feature.

A related klipper feedback:  Only after reading through the above thread it became clear to me that I can move an old klipper entry to the "head" of the clipboard (so it can be pasted either by clicking the middle mouse button or by entering ctrl+v) by clicking it with the left mouse button.
Can this be made more obvious to users?
Comment 4 Martin Flöser 2015-12-17 07:27:42 UTC
Klipper has been like that for a decade. Even more the behavior of selection and ctrl+c/v being distinct features is a standard X behavior independent on Klipper and been like that for even longer. Klipper's task is to make the clipboard more accessible, we cannot solve the problem of X's clipboard being confusing.

Sorry, I think you expect just to much. Wayland will fix it.
Comment 5 Fredy Neeser 2015-12-18 12:19:59 UTC
To be honest, I had never used Klipper's list (even though I'm using KDE since 10 years) until I followed this long thread on the Fedora KDE list showing that folks are confused about it.  

"Klipper has been like that for a decade"  - yes, I now see that it looks similar in KDE 4.14, but in KDE 4 it has a checkmark next to the top-level entry, which indicates the entry that is ready to be pasted.

In KDE Plasma 5, this checkmark is missing, so there's no visual indication of which entry can be pasted.  Also, even though Klipper has always been like that, it's really not obvious that left-clicking an entry in the list will move it to the top -- perhaps a tooltip (shown when the mouse pointer rests on one of the entries) would make it easier to discover this Klipper feature?

I agree that the X functionality for copy and paste can be confusing, but folks got used to it, so my conclusion is that the Klipper feature "Synchronize contents of the clipboard and the selection"  is not useful with X.  It might become more useful with Wayland, who knows ... 

Thanks for your hard work on Plasma 5, with 5.4 and 5.5!   I now start seeing lots of good stability improvements, which I had hoped for quite a while, since I upgraded to Fedora 22 (and Plasma 5) in July 2015.
Comment 6 Kevin Kofler 2015-12-20 01:24:46 UTC
Well, what Harald Reindl is complaining about is a different issue: He is saying that for him, the clipboards are getting synchronized even WITHOUT the "Synchronize …" option enabled. In his words:
> it's impossible to CTRL+C something (like a variable name in a sourcefile)
> and then double-click / CTRL+V to overwrite something with the
> clipboard when "that something" BECOMES the clipboard by select it

In that case, we have a real bug (and this is most certainly NOT the decades-old default behavior on X11). The problem is that he appears to be the only one reporting this behavior. Any idea what could be going on there?
Comment 7 ANIS M FAKHERUDDIN 2017-06-06 11:56:20 UTC
I have try this and it worked in extra options fill "+clipboard" and connect
then before you copy press grab key then copy and paste after that remove grab keys 
my version 4.14.16 pf KDE