diff options
author | Gary Wong <gtw@gnu.org> | 2009-08-22 22:31:14 -0600 |
---|---|---|
committer | Gary Wong <gtw@gnu.org> | 2009-08-22 22:31:14 -0600 |
commit | f56f44b401baa435693efe497b0cda8749a279fe (patch) | |
tree | a59f7b711c8a5bdbe19f034d49123d7c0739100d /keyboard.h |
Initial commit (gwm-basic 1.0).
Diffstat (limited to 'keyboard.h')
-rw-r--r-- | keyboard.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/keyboard.h b/keyboard.h new file mode 100644 index 0000000..6171bae --- /dev/null +++ b/keyboard.h @@ -0,0 +1,23 @@ +#ifndef KEYBOARD_H +#define KEYBOARD_H + +/* Map of keysyms: first index is keycode, second index is group/modifier. */ +extern xcb_keysym_t keyboard_map[ 0x100 ][ 4 ]; +/* Map of modifiers, indexed by xcb_map_index_t. */ +extern xcb_keycode_t *modifier_map[ 8 ]; + +#define NUM_KEY_ACTIONS 2 + +extern const struct key_action { + xcb_keysym_t keysym; + xcb_mod_mask_t modifiers; + void ( *handler )( struct gwm_window *window, xcb_generic_event_t *ev ); +} key_actions[ NUM_KEY_ACTIONS ]; + +extern void get_keyboard_mapping( int first, int count ); +extern void get_modifier_mapping( void ); +#if DEBUG +extern void cleanup_keyboard( void ); +#endif + +#endif |