22 February 2011

Redefine right click button to paste


Anonymous said...
> I would like to be able to redefine the right click button behavior to paste.
> I see this in the code but nothing to assign right click:
> // #define HOTKEY_PASTE CTRL GDK_V
> Ideally, in the code there would be a keybinding for the MENU_CUSTOM set to right click and then I would be able to reassign.

Thank you for the wish list. :-)
Currently there is no way to do that, but I made a quick hack for you.
Apply the patch below and right click will be paste.
I think I can add an option for this in next release.

--- evilvte.orig/src/evilvte.c
+++ evilvte/src/evilvte.c
@@ -1056,7 +1056,13 @@
   }
 #endif
 
-#if MENU
+  if (event->button == 3) {
+    GET_CURRENT_TAB(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
+    vte_terminal_paste_clipboard(VTE_TERMINAL(term->vte));
+    return TRUE;
+  }
+
+#if 0
   if (event->button == 3) {
 #ifdef MENU_MATCH_STRING_EXEC
       GET_CURRENT_TAB(gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));

2 comments:

  1. thanks, that worked

    ReplyDelete
  2. To Anonymous:
    Your feature request is now supported. Please see: http://evilvte.blogspot.com/2011/03/redefine-right-click-button-to-paste.html

    ReplyDelete