/* name: stk_keys.h info: keyboard keys additional handling, ie global shortcuts handling, maybe focus toggling - header file author: Dusan Halicky (dvh.tosomja@post.sk) licence: GNU GPL history: 2005-09-28 - start of developement todo: - finish and release this bugs: - notes: - */ #ifndef STK_KEYS_H #define STK_KEYS_H // enable some groups of keys from keysymdef.h #define XK_MISCELLANY #define XK_XKB_KEYS #define XK_LATIN1 extern KeySym stkkeys_keysym; // current pressed keycode extern int stkkeys_modifier; // active modifiers such as SHIFT, ATL, CTRL, META, ... extern int stkkeys_state; // state (contain modifiers!) extern char *stkkeys_name; // name of the key, e.g. "Space", "a", "B", "Delete", ... extern int stkkeys_namesize; // size of the name, e.g. 5 in "Space" extern bool stkkeys_ctrl, stkkeys_ctrl_l, stkkeys_ctrl_r; // CTRL modifier extern bool stkkeys_alt, stkkeys_alt_l, stkkeys_alt_r; // ALT modifier extern bool stkkeys_shift, stkkeys_shift_l, stkkeys_shift_r; // SHIFT modifier extern bool stkkeys_meta, stkkeys_meta_l, stkkeys_meta_r; // META modifier void stk_keys_update(XKeyEvent ke, bool pressed); // update the keys char stk_keys_ascii_char(KeySym keysym); // convert keysym into ascii character (XK_space -> ' ', XK_a -> 'a', ...) #endif // STK_KEYS_H