azbycxdw909 / garglk

Automatically exported from code.google.com/p/garglk
Other
0 stars 0 forks source link

Cannot paste text #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start up gargoyle on any game under Linux.  Do whatever you need to do
to get to a prompt.
2. Select some text in a terminal program; I happen to use gnome-terminal,
but this should work in xterm, rxvt, and KDE's terminal.  You should be
able to use just about any modern text editor as well wherever I say
"terminal."
3. Middle click in that same terminal.  Observe that the selected text is
pasted.  If you lack a middle mouse button, clicking both buttons
simultaneously is equivalent on many Linux distributions.
4. Middle click into gargoyle window.  Observe that the selected text is
not pasted.
5. Explicitly copy text from the terminal window. (Ctrl+Shift+C in
gnome-terminal; other terminals should have similar commands.)
6. Explicitly paste text into the terminal window.  Observe that the copied
text is pasted.
7. Try Ctrl+V in the gargoyle window.  Observed that the copied text is not
pasted.

What is the expected output? What do you see instead?
Expected behavior: Middle clicking will paste the contents of the selection
buffer.  Ctrl+V will paste the contents of the copy buffer.

(I'm not an X programmer, so I may be mangling the terminology.  By
"selection buffer" I mean "the buffer you automatically fill by selecting
text, and usually can paste by middle-clicking."  By "copy buffer" I mean
"the buffer you explicitly copy and paste things from, typically with
Ctrl+C and Ctrl+V in modern Gnome/KDE applications.)

What version of the product are you using? On what operating system?
gargoyle-2008-10-31-sources_rc1.zip
Ubuntu 8.04

Please provide any additional information below.

This is occasionally a nuisance when you have a complex command you need to
retype into a game, or when copying chunks of a walkthrough.

I've filed this separately from
http://code.google.com/p/garglk/issues/detail?id=7 because while they are
related, they can be implemented separately and have different
implementation details.

Original issue reported on code.google.com by Alan.A.D...@gmail.com on 30 Oct 2008 at 3:29

GoogleCodeExporter commented 8 years ago
It would also be useful if you could paste e.g. an entire transcript into 
Gargoyle
and have it queue every line as a separate input.

Original comment by bcressey@gmail.com on 30 Oct 2008 at 3:43

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago

Original comment by bcressey@gmail.com on 7 Nov 2008 at 10:52

GoogleCodeExporter commented 8 years ago

Original comment by bcressey@gmail.com on 1 Dec 2008 at 4:38

GoogleCodeExporter commented 8 years ago

Original comment by bcressey@gmail.com on 15 Dec 2008 at 8:09

GoogleCodeExporter commented 8 years ago
Fixed in r230.

I decided not to implement the Ctrl+C / Ctrl+V sequences.  Instead, selected 
text is
copied to the clipboard immediately.  Middle or right clicks paste the contents 
of
the clipboard.

Linux uses middle clicks for the selection buffer and right clicks for the 
explicit
copy buffer.  The distinction is not meaningful under Windows, so both buttons 
do the
same thing there.

Original comment by bcressey@gmail.com on 7 Jul 2009 at 10:47

GoogleCodeExporter commented 8 years ago
Confirmed working under Ubuntu 8.04.  Thanks!

Any particular reason to not implement Ctrl+C/Ctrl+V?  As best I can tell, 
they're
not used for any other purpose, and it is a common idiom on both Windows and 
Linux.

Original comment by Alan.A.D...@gmail.com on 11 Jul 2009 at 8:19

GoogleCodeExporter commented 8 years ago
There were some early considerations that argued for a simplified model that 
didn't
depend on keyboard input.  But performance considerations quickly made the
implementation more sophisticated.

As a practical matter there's no good reason at this point not to use Ctrl+C / 
Ctrl+V
instead of "release left button" and "click right button."  There are some 
related
bugs to fix, as the Glk window that has the focus isn't always obvious and isn't
always the one responding to key event. But those have to be fixed in any event.

I'll update the behavior before the next release.

Original comment by bcressey@gmail.com on 12 Jul 2009 at 3:25

GoogleCodeExporter commented 8 years ago
Implemented Ctrl+C/Ctrl+V in r238.

Original comment by bcressey@gmail.com on 14 Jul 2009 at 11:18