-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: ace6d4bcdb0381d83a8852a1f26178230dc2f082: path_to: revision_to:
commit ace6d4bcdb0381d83a8852a1f26178230dc2f082 Author: Marc Lehmann <schmorp@schmorp.de> Date: Mon Jan 2 21:17:01 2006 +0000 *** empty log message *** diff --git a/src/keyboard.C b/src/keyboard.C
--- a/src/keyboard.C +++ b/src/keyboard.C @@ -5,6 +5,7 @@ #include <cstring> +#include "rxvtperl.h" #include "keyboard.h" #include "command.h" @@ -74,6 +75,8 @@ output_string (rxvt_term *rt, const char *str) { if (strncmp (str, "command:", 8) == 0) rt->cmd_write ((unsigned char *)str + 8, strlen (str) - 8); + else if (strncmp (str, "perl:", 5) == 0) + PERL_INVOKE((rt, HOOK_KEYBOARD_COMMAND, DT_STRING, str + 5, DT_END)); else rt->tt_write ((unsigned char *)str, strlen (str)); } diff --git a/src/rxvtperl.h b/src/rxvtperl.h
--- a/src/rxvtperl.h +++ b/src/rxvtperl.h @@ -15,6 +15,7 @@ enum data_type { DT_END, DT_INT, DT_LONG, + DT_STRING, }; enum hook_type { @@ -38,6 +39,8 @@ enum hook_type { HOOK_REFRESH_BEGIN, HOOK_REFRESH_END, + HOOK_KEYBOARD_COMMAND, + HOOK_NUM, }; diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
--- a/src/rxvtperl.xs +++ b/src/rxvtperl.xs @@ -243,6 +243,10 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...) XPUSHs (sv_2mortal (newSViv (va_arg (ap, long)))); break; + case DT_STRING: + XPUSHs (sv_2mortal (newSVpv (va_arg (ap, char *), 0))); + break; + case DT_END: { va_end (ap); @@ -305,6 +309,7 @@ BOOT: set_hookname (TTY_ACTIVITY); set_hookname (REFRESH_BEGIN); set_hookname (REFRESH_END); + set_hookname (KEYBOARD_COMMAND); sv_setpv (get_sv ("urxvt::LIBDIR", 1), LIBDIR); }
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 12:02:25 2024