improve PRIMARY buffer copy-paste behaviour, paste over

Thiago Macieira thiago at kde.org
Thu Mar 12 06:12:01 UTC 2020


On Friday, 6 March 2020 03:47:28 PDT Thomas Kluyver wrote:
> One thing that might get broken: creating a selection with the keyboard
> (shift + arrow keys) and then middle clicking to paste it somewhere else.
> When you select with the keyboard, there's no mouse up event, and no other
> obvious event to mean a selection is 'finished'. Maybe this is an unusual
> pattern, but I bet there are some people who do it.

When you select with the keyboard, PRIMARY doesn't get updated. So you can 
select all you want, for however long and however many keystrokes it takes, 
then middle-click.

I do this all the time. The most common scenario is to select with Ctrl+A in a 
single-line edit, so I can replace the entire text with new text.

> Maybe the answer to that is just to say that PRIMARY is updated when either
> the mouse button is released, or the selection is changed with the
> keyboard.

PRIMARY shouldn't be updated by keyboard selection alone. It should be updated 
only on mouse selections or on a specific keystroke that causes a copy-to-
PRIMARY. If your hands are on the keyboard already, pressing one extra key 
combination isn't too much to ask for. 

There's no predefined shortcut for that, but I'm sure we can find one to 
complement: Shift+Insert is copy-to-CLIPBOARD, Ctrl+Insert is paste-CLIPBOARD 	
and Ctrl+Shift+Insert is paste-PRIMARY.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products





More information about the xdg mailing list