After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 153265 - Handle Sun Cut, Copy, Paste keys
Handle Sun Cut, Copy, Paste keys
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.11.x
Other Linux
: High normal
: ---
Assigned To: Chris Wilson
VTE Maintainers
Depends on: 399057
Blocks:
 
 
Reported: 2004-09-21 10:47 UTC by Narayana Pattipati
Modified: 2007-08-30 11:09 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Patch to handle Sun Cut, Copy, Paste keys (2.90 KB, patch)
2004-09-21 12:13 UTC, Narayana Pattipati
none Details | Review
updated patch (2.31 KB, patch)
2007-04-17 05:40 UTC, Brian Cameron
needs-work Details | Review
updated patch (2.78 KB, patch)
2007-08-10 19:46 UTC, Brian Cameron
committed Details | Review

Description Narayana Pattipati 2004-09-21 10:47:35 UTC
VTE does not handle Sun Cut, Copy, Paste keys. Because of this, user will not be
able to copy, paste text on the terminal using these keys. These keys are very
useful and there is a need to bind them to copy, paste operations.

Also, there are Sun USB keyboards (Sun type6_usb) which can be hot plugged onto
any Linux system. Hence, there is a need for handling these keys in terminal.
Comment 1 Narayana Pattipati 2004-09-21 12:07:21 UTC
I will attach a patch which handles the keys by defining "copy-clipboard",
"paste-clipboard" siganls and binding the Cut, Copy, Paste keys to the signals.
Comment 2 Narayana Pattipati 2004-09-21 12:13:48 UTC
Created attachment 31768 [details] [review]
Patch to handle Sun Cut, Copy, Paste keys
Comment 3 Kjartan Maraas 2004-10-18 10:22:27 UTC
Please review.
Comment 4 Dennis Krul (dweazle) 2005-12-29 12:50:07 UTC
It's been more than a year since the last comment. Is still still an issue? Has the patch been applied in or does it still patch cleanly to CVS?

Please update.
Comment 5 Olav Vitters 2006-07-04 12:45:08 UTC
Pretty certain this is still an issue.
Comment 6 Brian Cameron 2007-04-17 05:40:38 UTC
Created attachment 86473 [details] [review]
updated patch


Here is an updated patch that applies against the latest code.
Comment 7 Behdad Esfahbod 2007-04-17 06:40:06 UTC
The patch should remove two sets of two reserved pointers to maintain ABI compatibility.
Comment 8 Brian Cameron 2007-05-02 06:30:46 UTC
Could you be more clear about what two reserved pointers you are talking about?  I'm happy to update the patch if needed.
Comment 9 Behdad Esfahbod 2007-08-10 03:15:13 UTC
Comment on attachment 86473 [details] [review]
updated patch

>--- vte-0.11.11/src/vte.h	2004-09-21 15:06:26.000000000 +0530
>+++ vte-0.11.11-new/src/vte.h	2004-09-21 15:18:48.000000000 +0530
>@@ -95,6 +95,8 @@ struct _VteTerminalClass {
> 	void (*text_inserted)(VteTerminal* terminal);
> 	void (*text_deleted)(VteTerminal* terminal);
> 	void (*text_scrolled)(VteTerminal* terminal, gint delta);
>+	void (*copy_clipboard)(VteTerminal* terminal);
>+	void (*paste_clipboard)(VteTerminal* terminal);
> 
> 	/* Padding for future expansion. */
> 	void (*vte_reserved1)(void);

Remove vte_reserved5 and vte_reserved6 here, to not change the struct size.

>@@ -137,6 +139,9 @@ struct _VteTerminalClass {
> 	guint text_deleted_signal;
> 	guint text_scrolled_signal;
> 
>+	guint copy_clipboard_signal;
>+	guint paste_clipboard_signal;
>+
> 	guint reserved1;
> 	guint reserved2;
> 	guint reserved3;

Same here, remove reserved5 and reserved6.
Comment 10 Brian Cameron 2007-08-10 19:46:14 UTC
Created attachment 93453 [details] [review]
updated patch


Thanks for your comments - here is an updated patch that reflects your comments.  Is this okay to go upstream?
Comment 11 Behdad Esfahbod 2007-08-13 19:08:51 UTC
(In reply to comment #10)
> Created an attachment (id=93453) [edit]
> updated patch
> 
> 
> Thanks for your comments - here is an updated patch that reflects your
> comments.  Is this okay to go upstream?

I don't know how the signals in vte work.  Need someone who understand the code to review it.  I'll wait for Chris ;).
Comment 12 Chris Wilson 2007-08-13 19:49:51 UTC
Seems sane (aside from continuing vte's affliction of stashing the signal ids in the class structure) and finally introduces vte to the world of key bindings! I'll integrate and test it in the morning...
Comment 13 Chris Wilson 2007-08-30 11:09:33 UTC
r1936: 2007-08-30  Chris Wilson  <chris@chris-wilson.co.uk>

	Bug 153265 – Handle Sun Cut, Copy, Paste keys
	Patch by Brian Cameron.

	* doc/reference/tmpl/vte.sgml:
	* src/vte.c (vte_terminal_class_init),
	(vte_terminal_real_copy_clipboard), (vte_terminal_copy_clipboard),
	(vte_terminal_real_paste_clipboard),
	(vte_terminal_paste_clipboard):
	* src/vte.h:
	    Add key bindings for the special function keys.