6 typedef struct KEYBOARD_REC KEYBOARD_REC;
12 GSList *keys, *default_keys;
22 extern GSList *keyinfos;
24 /* Creates a new "keyboard" - this is used only for keeping track of
25 key combo states and sending the gui_data parameter in "key pressed"
27 KEYBOARD_REC *keyboard_create(void *gui_data);
28 /* Destroys a keyboard */
29 void keyboard_destroy(KEYBOARD_REC *keyboard);
30 /* Returns TRUE if key press was consumed. Control characters should be sent
31 as "^@" .. "^_" instead of #0..#31 chars, #127 should be sent as ^? */
32 int key_pressed(KEYBOARD_REC *keyboard, const char *key);
34 void key_bind(const char *id, const char *description,
35 const char *key_default, const char *data, SIGNAL_FUNC func);
36 void key_unbind(const char *id, SIGNAL_FUNC func);
38 void key_configure_freeze(void);
39 void key_configure_thaw(void);
41 void key_configure_add(const char *id, const char *key, const char *data);
42 void key_configure_remove(const char *key);
44 KEYINFO_REC *key_info_find(const char *id);
46 #define ENTRY_REDIRECT_FLAG_HOTKEY 0x01
47 #define ENTRY_REDIRECT_FLAG_HIDDEN 0x02
49 void keyboard_entry_redirect(SIGNAL_FUNC func, const char *entry,
50 int flags, void *data);
52 void keyboard_init(void);
53 void keyboard_deinit(void);