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