ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/keyboard.C
(Generate patch)

Comparing rxvt-unicode/src/keyboard.C (file contents):
Revision 1.64 by sf-exg, Tue Apr 29 13:10:06 2014 UTC vs.
Revision 1.65 by sf-exg, Tue Apr 29 13:17:54 2014 UTC

102 key->str = translation; 102 key->str = translation;
103 key->type = keysym_t::STRING; 103 key->type = keysym_t::STRING;
104 104
105 if (strncmp (translation, "builtin:", 8) == 0) 105 if (strncmp (translation, "builtin:", 8) == 0)
106 key->type = keysym_t::BUILTIN; 106 key->type = keysym_t::BUILTIN;
107 else if (strncmp (translation, "builtin-string:", 15) == 0)
108 key->type = keysym_t::BUILTIN_STRING;
107 109
108 if (keymap.size () == keymap.capacity ()) 110 if (keymap.size () == keymap.capacity ())
109 keymap.reserve (keymap.size () * 2); 111 keymap.reserve (keymap.size () * 2);
110 112
111 keymap.push_back (key); 113 keymap.push_back (key);
130 132
131 if (index >= 0) 133 if (index >= 0)
132 { 134 {
133 keysym_t *key = keymap [index]; 135 keysym_t *key = keymap [index];
134 136
137 if (key->type == keysym_t::BUILTIN_STRING)
138 {
139 term->tt_write_user_input (kbuf, len);
140 return true;
141 }
135 if (key->type != keysym_t::BUILTIN) 142 else if (key->type != keysym_t::BUILTIN)
136 { 143 {
137 wchar_t *ws = rxvt_utf8towcs (key->str); 144 wchar_t *ws = rxvt_utf8towcs (key->str);
138 char *str = rxvt_wcstombs (ws); 145 char *str = rxvt_wcstombs (ws);
139 // TODO: do (some) translations, unescaping etc, here (allow \u escape etc.) 146 // TODO: do (some) translations, unescaping etc, here (allow \u escape etc.)
140 free (ws); 147 free (ws);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines