… | |
… | |
105 | free (keymap [i]->str); |
105 | free (keymap [i]->str); |
106 | delete keymap [i]; |
106 | delete keymap [i]; |
107 | } |
107 | } |
108 | } |
108 | } |
109 | |
109 | |
110 | // a wrapper for register_translation that converts the input string |
|
|
111 | // to utf-8 and expands 'list' syntax. |
|
|
112 | void |
110 | void |
113 | keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, const wchar_t *ws) |
111 | keyboard_manager::register_user_translation (KeySym keysym, unsigned int state, const wchar_t *ws) |
114 | { |
112 | { |
115 | char *translation = rxvt_wcstoutf8 (ws); |
113 | char *translation = rxvt_wcstoutf8 (ws); |
116 | |
114 | |
117 | register_translation (keysym, state, translation); |
|
|
118 | } |
|
|
119 | |
|
|
120 | void |
|
|
121 | keyboard_manager::register_translation (KeySym keysym, unsigned int state, char *translation) |
|
|
122 | { |
|
|
123 | keysym_t *key = new keysym_t; |
115 | keysym_t *key = new keysym_t; |
124 | |
116 | |
125 | if (key && translation) |
117 | if (key && translation) |
126 | { |
118 | { |
127 | key->keysym = keysym; |
119 | key->keysym = keysym; |