Clipboard for the dummies

Shane Wright me at shanewright.co.uk
Fri Nov 1 23:28:05 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I don't know that I'm really qualified to post here on this, but I have quite 
a strong view of what I (with my user hat on) really want for the clipboard:

- - selection and clipboard are separate

- - clipboard only operable by Ctrl+X/C/V

- - selection only set by mouse, only pastable by middle button

- - other ways of selecting text do not update the selection; this means 
autoselected text in dialogs and keyboard selections (why? cos its bloody 
annoying to have to go back and get my intended selection when a dialog takes 
it away, and I need the keyboard selection to remove existing data in text 
fields when I want to replace it with my intended selection).

- - selection should be preserved when text is unselected (because I want to be 
able to close the window that gave me the selection, and/or I want to use a 
keyboard selection to clear other data in the same).

The above probably doesn't fit any defined standard, but I feel it'd give the 
users the most power with the least confusion.

Anyway, thats my 2cents.

Cheers

Shane


On Friday 01 November 2002 11:03 am, Lubos Lunak wrote:
>  After talking to some people, looks like the previous mail was too
> complicated. Let's try it in a different way, so maybe now actually
> somebody says something.
>  (Havoc: please grep for your name :)  )
>
> Definition of terms:
> clipboard - copied in using Ctrl+C, Ctrl+X, pasted using Ctrl+V
> selection - the thing pasted with MMB, copied by selecting some text
> (whether only by mouse or also by keyboard is unclear, we have it
> inconsistent right now, and need to decide)
> selected text - selected text, I use a different term than 'selection'
> because they're not always the same (again, it's inconsistent, and we need
> to decide)
>
>  Also, selection and clipboard are completely separate, at least from the
> implementation point of view. Having a Klipper setting for automatic
> selection->clipboard syncing (one-way, off by default) seems to be
> acceptable and harmless, besides the broken KDE2 behaviour, which many
> people want for some reason. The following is about when they're completely
> separate, people wanting the syncing should keep in mind their setting
> while reading the following. I'm not going to talk about clipboard at all,
> only about selection and selected text. There's completely no problem with
> clipboard. Users who don't know about the selection feature shouldn't have
> a problem at all.
>
>  There's no official documentation on how the selection should work, at
> least I'm not aware of any (please enlighten me in case there is). There
> are only unofficial documents describing how it should be done, there's how
> plain X apps (xedit,...) do it, there's how other (Gtk, etc.) apps do it.
> The only thing on which everybody agrees is that LMB selects and MMB pastes
> it afterwards, all remaining details differ.
>
>  The most in-the-spirit-of-X11 way, which Gtk, xedit use, is like this:
> Selection is selected text, and selected text is selection (the ONLY
> selection). Which means:
> - selected text, no matter how selected, will be pasted by MMB
> - if there's nothing selected, MMB won't do anything
> - if you open a dialog with a lineedit which autoselects the text (i.e. the
> default, but you can start typing whatever you want immediately), this
> becomes the selection pasted by MMB, and as soon as the dialog is closed,
> MMB will paste nothing
> - if you select something in one app, previous selected text is unselected,
> no matter where it was, even in other app (this a bit conflicts with the
> 'if you don't know about MMB, it won't get in your way at all' claiming)
>
> I guess that's all (Havoc?). I suggest you turn off Klipper and play with
> some Gtk2 app for a while if you can.
>
>  Other apps, including KDE apps, usually use a less consistent mess, by
> allowing one or more of the following:
> - only text selected by the mouse becomes the selection (i.e. not text
> selected by keyboard, or autoselected lineedits)
> - when there's no selected text, selection is still remembered (the last
> valid selection) - this is why Qt lineedits unselect on focus out, while
> Gtk ones don't
> - when a text is selected elsewhere, previously selected text stays
> selected - explicit actions like 'copy link location' set selection, even
> if there's no text selected (I couldn't find any such action in any Gtk2
> app to test, Havoc?)
> - let's ignore the KDE2 style behaviour of mixing clipboard and selection,
> which e.g. Emacs uses too, according to Havoc
>
>  When all this summed up (except for the clipboard and selection mixing),
> it's the other solution I included in the previous mail (let's call this
> variant the 'Joe User solution'). Both of the extremes seems most
> consistent solutions to me, but we can even choose something inbetween.
>
>  I'd personally like the Joe User way of doing it, as I find this one the
> best from the users point of view, and certain features of the X11-pure
> style can be seen as misfeatures, but I expect a lot of people wouldn't
> like this and would want the X11-pure style solution. Maybe we could have a
> setting for either the Joe User way or the X11-pure style for the old
> fashioned ones, but we should have a one, at most two ways of doing it -
> right now, all of the four points above are true in some KDE/Qt
> apps/widgets and not in others. Remember, it would be nice if we did it the
> same way like others do, so we'd have to make at least Qt and Gtk work the
> same, in case we don't go with the X11-pure style (Havoc: any chance?).
>
>  Now, in case somebody cares, please say something. Try it during the
> weekend as your homework ;). Ask if you don't understand something, choose
> something, suggest a better solution (or just say that you don't care - I
> can do other things then).
>
>  PS: Just in case you noticed, the recent qt-copy snapshot has a QLineEdit
> bug, which prevents MMB pasting from working. Already reported to TT.

- -- 
Shane Wright
http://www.shanewright.co.uk/
Public key: http://www.shanewright.co.uk/files/public_key.asc

Do not meddle in the affairs of sysadmins, for they are quick to anger and 
have not need for subtlety.
(found on the net)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9ww4F5DXg6dCMBrQRAn8aAJ0RjDQzSFLxnxoscMbWqqZh5lLriACgj1Vj
X7Cr5mwXCzTmqrHKCZMJReA=
=bpq+
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list