--- rxvt-unicode/src/keyboard.h 2011/02/21 07:41:01 1.13 +++ rxvt-unicode/src/keyboard.h 2011/12/03 11:31:56 1.23 @@ -28,7 +28,6 @@ #include -#include "feature.h" #include "rxvtutil.h" #define KEYSYM_HASH_BITS 4 /* lowest #bits of keysym is used as hash key */ @@ -47,17 +46,11 @@ #endif struct rxvt_term; -struct keysym_t; - -typedef void (keyevent_handler) (rxvt_term *rt, - keysym_t *key, - KeySym keysym, - unsigned int state); struct keysym_t { enum keysym_type { - STRING, LIST, BUILTIN, + STRING, BUILTIN, }; KeySym keysym; @@ -65,9 +58,8 @@ /* the higher bits are preserved for Meta/NumLock keys */ /* which are mapped to corresponding lower bits at register time */ uint16_t state; /* indicates each modifiers' DOWN/UP status */ - uint16_t range; /* =1: single keysym; >1: a of range keysyms */ keysym_type type; - const char *str; /* would normally be a keycode translation in UTF-8 */ + char *str; /* the key's definition encoded in UTF-8 */ }; class keyboard_manager @@ -76,14 +68,11 @@ keyboard_manager (); ~keyboard_manager (); - void clear (); - void register_user_translation (KeySym keysym, unsigned int state, const char *trans); - void register_done (); // call this to make newly registered keymaps take effect + void register_user_translation (KeySym keysym, unsigned int state, const wchar_t *ws); + void register_done (); // call this to make newly registered key bindings take effect bool dispatch (rxvt_term *term, KeySym keysym, unsigned int state); private: - void register_keymap (keysym_t *key); - void setup_hash (); int find_keysym (KeySym keysym, unsigned int state); private: