--- rxvt-unicode/src/keyboard.h 2010/08/23 16:06:44 1.11 +++ rxvt-unicode/src/keyboard.h 2014/04/29 13:17:54 1.26 @@ -4,7 +4,7 @@ * * All portions of code are copyright by their respective author/s. * Copyright (c) 2005 WU Fengguang - * Copyright (c) 2005-2006 Marc Lehmann + * Copyright (c) 2005-2006 Marc Lehmann * * 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 @@ -28,12 +28,11 @@ #include -#include "feature.h" #include "rxvtutil.h" #define KEYSYM_HASH_BITS 4 /* lowest #bits of keysym is used as hash key */ -#define KEYSYM_HASH_BUCKETS (1<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,28 +68,16 @@ 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 - bool dispatch (rxvt_term *term, KeySym keysym, unsigned int state); + 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, const char *kbuf, int len); private: - void register_keymap (keysym_t *key); - void purge_duplicate_keymap (); - void setup_hash (); int find_keysym (KeySym keysym, unsigned int state); private: uint16_t hash[KEYSYM_HASH_BUCKETS]; vector keymap; - -#if STOCK_KEYMAP - // stock keymaps are all static data - static keysym_t stock_keymap[]; -#endif - // user keymaps and their .string are dynamically allocated and freed - vector user_keymap; - vector user_translations; }; #endif /* KEYSYM_RESOURCE */