GNOME Bugzilla – Bug 153265
Handle Sun Cut, Copy, Paste keys
Last modified: 2007-08-30 11:09:33 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.
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.
Created attachment 31768 [details] [review] Patch to handle Sun Cut, Copy, Paste keys
Please review.
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.
Pretty certain this is still an issue.
Created attachment 86473 [details] [review] updated patch Here is an updated patch that applies against the latest code.
The patch should remove two sets of two reserved pointers to maintain ABI compatibility.
Could you be more clear about what two reserved pointers you are talking about? I'm happy to update the patch if needed.
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.
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?
(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 ;).
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...
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.