Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!crdgw1!uunet!mcsun!cernvax!chx400!chx400!sicsun!sic!brossard
From: brossard@sic.epfl.ch (Alain Brossard EPFL-SIC/SII)
Newsgroups: comp.windows.x
Subject: Re: Cut and Paste under OpenWindows
Message-ID: <1991Apr26.105107@sic.epfl.ch>
Date: 26 Apr 91 08:51:07 GMT
References: <9104231231.AA22736@cas.org> <7414@auspex.auspex.com>
Sender: news@sicsun.epfl.ch
Reply-To: brossard@sasun1.epfl.ch
Organization: Ecole Polytechnique Federale de Lausanne
Lines: 45
In article <7414@auspex.auspex.com>, guy@auspex.auspex.com (Guy Harris) writes:
|> >Can someone provide me with a layman's explanation concerning cut
|> >and pasting of text under OpenWindows?
|>
|> #
|> # Make W be "copy to clipboard" in Text widget.
|> #
|> *Text.Translations: #override \
|> MetaW: extend-end(CLIPBOARD)
I'm using the following bindings:
*Text.translations: #override \n\
L6: extend-start() extend-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)\n\
L8: insert-selection(CLIPBOARD) \n\
L10: extend-start() extend-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)\n\
L10: kill-selection() \n\
But the insert-selection only works when the text is still highlighted
(selected?). It looks like the insert-selection only works using the
PRIMARY rather than the specified CLIPBOARD? But L6 and L10 do work
as I'm able to paste into xview applications (like mailtool).
|> It appears, at
|> least from the Athena Widgets documentation I have, that the
|> "insert-selection" action can be used to insert the CLIPBOARD selection.
|>
|> Unfortunately, I have been unable to convince the stupid "xterm" widget
|> (i.e., the widget internal to "xterm" that implements "xterm") that I
|> want to have a *keyboard* event mean "copy to clipboard", which makes it
|> a real pain to copy from "xterm" to an XView application.
Here I have a working solution:
XTerm*VT100.Translations: \
L6: start-extend() select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)\n\
L8: insert-selection(CLIPBOARD) \n\
L10: start-extend() select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)\n\
This definitely works to and from xview applications. But as mentionned
above I have been unable to get it to work with the Xaw Text widget.
--
Alain Brossard, Ecole Polytechnique Federale de Lausanne,
SIC/SII, EL-Ecublens, CH-1015 Lausanne, Suisse
brossard@sasun1.epfl.ch