From kde-core-devel Fri Nov 01 23:28:05 2002 From: Shane Wright Date: Fri, 01 Nov 2002 23:28:05 +0000 To: kde-core-devel Subject: Re: Clipboard for the dummies X-MARC-Message: https://marc.info/?l=kde-core-devel&m=103619365203536 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I don't know that I'm really qualified to post here on this, but I have q= uite=20 a strong view of what I (with my user hat on) really want for the clipboa= rd: - - 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=20 autoselected text in dialogs and keyboard selections (why? cos its bloody= =20 annoying to have to go back and get my intended selection when a dialog t= akes=20 it away, and I need the keyboard selection to remove existing data in tex= t=20 fields when I want to replace it with my intended selection). - - selection should be preserved when text is unselected (because I want= to be=20 able to close the window that gave me the selection, and/or I want to use= a=20 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=20 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 n= eed > to decide) > > Also, selection and clipboard are completely separate, at least from t= he > 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 comple= tely > separate, people wanting the syncing should keep in mind their setting > while reading the following. I'm not going to talk about clipboard at a= ll, > only about selection and selected text. There's completely no problem w= ith > clipboard. Users who don't know about the selection feature shouldn't h= ave > 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). Ther= e > 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 i= t. > The only thing on which everybody agrees is that LMB selects and MMB pa= stes > 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 close= d, > MMB will paste nothing > - if you select something in one app, previous selected text is unselec= ted, > no matter where it was, even in other app (this a bit conflicts with th= e > '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 wi= th > 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 las= t > valid selection) - this is why Qt lineedits unselect on focus out, whil= e > Gtk ones don't > - when a text is selected elsewhere, previously selected text stays > selected - explicit actions like 'copy link location' set selection, ev= en > if there's no text selected (I couldn't find any such action in any Gtk= 2 > app to test, Havoc?) > - let's ignore the KDE2 style behaviour of mixing clipboard and selecti= on, > 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 thi= s > 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 t= he > 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 ha= ve 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, cho= ose > 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 QLineE= dit > bug, which prevents MMB pasting from working. Already reported to TT. - --=20 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 an= d=20 have not need for subtlety. (found on the net) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE9ww4F5DXg6dCMBrQRAn8aAJ0RjDQzSFLxnxoscMbWqqZh5lLriACgj1Vj X7Cr5mwXCzTmqrHKCZMJReA=3D =3Dbpq+ -----END PGP SIGNATURE-----