--- rxvt-unicode/src/keyboard.C 2014/04/29 13:17:54 1.65 +++ rxvt-unicode/src/keyboard.C 2014/05/23 22:25:34 1.70 @@ -8,7 +8,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -91,20 +91,20 @@ } void -keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, const wchar_t *ws) +keyboard_manager::register_action (KeySym keysym, unsigned int state, const wchar_t *ws) { - char *translation = rxvt_wcstoutf8 (ws); + char *action = rxvt_wcstoutf8 (ws); keysym_t *key = new keysym_t; key->keysym = keysym; key->state = state; - key->str = translation; + key->str = action; key->type = keysym_t::STRING; - if (strncmp (translation, "builtin:", 8) == 0) + if (strncmp (action, "builtin:", 8) == 0) key->type = keysym_t::BUILTIN; - else if (strncmp (translation, "builtin-string:", 15) == 0) + else if (strncmp (action, "builtin-string:", 15) == 0) key->type = keysym_t::BUILTIN_STRING; if (keymap.size () == keymap.capacity ()) @@ -152,10 +152,10 @@ term->cmdbuf_append (str + 8, strlen (str) - 8); else if (strncmp (str, "string:", 7) == 0) term->tt_write_user_input (colon + 1, strlen (colon + 1)); - else if (strncmp (str, "perl:", 8) == 0) + else if (strncmp (str, "perl:", 5) == 0) HOOK_INVOKE ((term, HOOK_USER_COMMAND, DT_STR, colon + 1, DT_END)); else - HOOK_INVOKE ((term, HOOK_KEYBOARD_DISPATCH, DT_STR_LEN, str, colon - str, DT_STR, colon + 1, DT_END)); + HOOK_INVOKE ((term, HOOK_ACTION, DT_STR_LEN, str, colon - str, DT_STR, colon + 1, DT_INT, 0, DT_STR_LEN, kbuf, len, DT_END)); } else term->tt_write_user_input (str, strlen (str));