8 #define CURSOR_RIGHT 77
11 // we use first 9 bits for keys and special keys.
13 #define CK_ERR CK_UNDEF
16 #define CK_RETURN '\r'
22 #define CK_PAGE_UP 0x100
23 #define CK_PAGE_DOWN 0x101
24 #define CK_CURSOR_UP 0x102
25 #define CK_CURSOR_DOWN 0x103
26 #define CK_CURSOR_LEFT 0x104
27 #define CK_CURSOR_RIGHT 0x105
28 #define CK_LSHIFT 0x106
29 #define CK_RSHIFT 0x107
32 #define CK_ALTGR 0x10A
33 #define CK_LFLAG 0x10B
34 #define CK_RFLAG 0x10C
35 #define CK_CONTEXT 0x10D
36 #define CK_LCTRL 0x10E
37 #define CK_RCTRL 0x10F
51 #define CK_BACKSPACE 0x11D
52 //#define CK_RETURN 0x11E
53 // 0x11E is free for usage
59 #define CK_MASK ((1 << 9) - 1)
61 // use higher bits for events and modifiers.
62 #define CK_EVENT_BIT_FIRST 9
63 #define CK_RESIZE_EVENT (1 << CK_EVENT_BIT_FIRST)
64 #define CK_EVENT_BIT_LAST (CK_EVENT_BIT_FIRST + 1)
65 #define CK_MOUSE_EVENT (1 << (CK_EVENT_BIT_LAST))
66 #define CK_EVENT_MASK ((1 << CK_EVENT_BIT_FIRST) | (1 << (CK_EVENT_BIT_LAST)))
68 #define CK_MOD_BIT_FIRST (CK_EVENT_BIT_LAST + 1)
69 #define CK_AND_EVENT_MASK ((1 << CK_MOD_BIT_FIRST) - 1)
71 #define CK_MOD_ALT (1 << (CK_MOD_BIT_FIRST))
72 #define CK_MOD_ALTGR (1 << (CK_MOD_BIT_FIRST + 1))
73 #define CK_MOD_SHIFT (1 << (CK_MOD_BIT_FIRST + 2))
74 #define CK_MOD_CTRL (1 << (CK_MOD_BIT_FIRST + 3))
75 #define CK_MOD_FLAG (1 << (CK_MOD_BIT_FIRST + 4))
76 #define CK_MOD_CONTEXT (1 << (CK_MOD_BIT_FIRST + 5))
77 #define CK_MOD_NUMERICPAD (1 << (CK_MOD_BIT_FIRST + 6))