DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Support paste on enter functionality in clipboard

Open Vantesh opened this issue 1 year ago • 3 comments

It would be great to have an option for “paste on Enter” in the clipboard popup.

For reference, the clipboard utility clipse-gui implements this feature — when a clipboard item is selected and the user presses Enter, it automatically pastes the selection into the focused window.

They achieve this using the following command under the hood:

wtype -M ctrl -P v -p v -m ctrl

This simulates a Ctrl+V keystroke, effectively pasting the copied content.

Vantesh avatar Oct 09 '25 07:10 Vantesh

IMHO ctrl+v shortcut may be bound to other actions in different applications. It can be dangerous to send it to any process. I use ctrl+insert for this and send it in hyprland using hyprctl dispatch sendshortcut "SHIFT, Insert,". I think this keyboard shortcut has less chance of being associated with a destructive action, and it works for me in all applications.

chpock avatar Oct 10 '25 00:10 chpock

Maybe a good compromise would be to make the "paste on Enter" behavior customizable? Let users choose the simulated paste shortcut (Ctrl+V, Shift+Insert, etc.) in settings — or even disable it entirely if they prefer manual pasting.

Vantesh avatar Oct 11 '25 17:10 Vantesh

I just did it the easy way, Shift+Enter is paste, using the wtype command when present

bbedward avatar Dec 12 '25 20:12 bbedward