Bug 510288

Summary: Keyboard shortcut to paste last n copied items, all at once
Product: [Plasma] plasmashell Reporter: droidwayin <droidwayin>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: kde, nate, qydwhotmail
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description droidwayin 2025-10-06 06:04:37 UTC
Idea for a clipboard enhancement in KDE that could be a big time-saver, especially for users who frequently copy and paste from different parts of a document or app.

Introduce a "multi-copy" mode where:

When using a special key combo (e.g., `Ctrl + Alt + C`) or a modifier in the right-click menu, the selected text is added to a cumulative clipboard buffer instead of replacing it.

After copying multiple different text blocks this way, pasting would insert all collected text blocks, separated by paragraphs or line breaks.

The buffer could reset after a paste, or be cleared manually.

Example Use Case

Copy 3 separate code snippets from different areas of a file or terminal. Later, paste them all together in one go for a documentation or email draft.

Thanks!
Comment 1 David Edmundson 2025-10-06 14:02:22 UTC
Unfortunately it is not feasible. It's the apps themselves that handle the keyboard shortcut for copy and then update the clipboard directly.
For this to work to any meaningfully predictable way we would need support in GTK/Electron and that's not going to happen.

What we can do is choose what you paste so you can paste the last N things you copied quite quickly. There are some shortcuts in klipper already, and improving that UX is something we hope to work on.
Comment 2 droidwayin 2025-10-06 14:13:59 UTC
Instead of the usual repetitive workflow, copy one item, switch windows or tabs, paste, go back, copy again, and repeat. This feature would eliminate the need to constantly switch contexts, retype, or manually delete and re-assemble content. It streamlines the entire copy-paste process by allowing users to gather multiple pieces of text in sequence and paste them all at once.

For example, when rephrasing a paragraph, a user could selectively copy key words or phrases in the desired order, then paste them together into a new structure, without having to retype or manage multiple clipboard entries.

This kind of functionality would be especially useful for teachers preparing lesson materials, students drafting reports, researchers organizing excerpts or notes, developers collecting code snippets, or anyone regularly working with structured text. 

It significantly reduces the friction involved in content manipulation and lowers the mental overhead of remembering what was copied and where it should go.

To further improve control and flexibility, an "Undo Last Copy" shortcut (e.g., Ctrl + Alt + Z) could be included. This would remove the most recently added item from the cumulative buffer,  allowing users to quickly correct mistakes or adjust their selection without interrupting the flow with a paste or starting over.
Comment 3 droidwayin 2025-10-06 14:42:28 UTC
(In reply to David Edmundson from comment #1)
> Unfortunately it is not feasible. It's the apps themselves that handle the
> keyboard shortcut for copy and then update the clipboard directly.
> For this to work to any meaningfully predictable way we would need support
> in GTK/Electron and that's not going to happen.
> 
> What we can do is choose what you paste so you can paste the last N things
> you copied quite quickly. There are some shortcuts in klipper already, and
> improving that UX is something we hope to work on.

As an alternative to my initial idea of accumulating copied items at copy time, a “Collective Paste Mode” could be introduced in Klipper to achieve a similar end result.

In this mode, users would first activate Collective Paste Mode via a keyboard shortcut or a UI toggle. Once enabled, they could copy multiple items as usual using Ctrl+C. Klipper would automatically flag and group these copied entries as part of the current session.

When ready, the user could simply paste, and all copied items from that session would be inserted together as a single block; separated by spaces, line breaks, or a user-defined delimiter. This eliminates the need to manually select or combine entries afterward.

I hope, this approach keeps the feature entirely within KDE’s control and avoids relying on how external applications handle copy operations.