14 #define KEY1 0x00000001
15 #define KEY2 0x00000002
16 #define KEY3 0x00000004
17 #define KEY4 0x00000008
18 #define ANYKEY 0xFFFFFFFF
21 #define KEY_ESCAPE 0x80000000
22 #define KEY_LISTTL 0x40000000
23 #define KEY_LISTUP 0x20000000
24 #define KEY_LISTDN 0x10000000
27 #define KEY_LIST1 0x00000010
28 #define KEY_LIST2 0x00000020
29 #define KEY_LIST3 0x00000040
30 #define KEY_LIST4 0x00000080
31 #define KEY_LIST5 0x00000100
32 #define KEY_LIST6 0x00000200
33 #define KEY_LIST7 0x00000400
34 #define KEY_LIST8 0x00000800
47 #define KEYTM_UNKNOWN 0x00
48 #define KEYTM_CLASSIC 0x01
49 #define KEYTM_STANDARD 0x02
50 #define KEYTM_REGIONS 0x03
51 #define KEYTM_LISTMENU 0x04
54 #define KEY_TIMEOUT 0x00000000
57 #define KEY_INVALID 0xFFFFFFFF
73 KEYCODE
KEYWait(KEYCODE excode);
79 int KEYXY(
int* x,
int* y);
80 int activate_escape(
int escape);
Defines types used for the EyeBot 7.
KEYCODE KEYWait(KEYCODE excode)
Wait for specific keys only.
Definition: key.c:310
Structure defining boxes for touchscreen use.
Definition: types.h:204
int KEYGetRegion(int index, BOX *region)
Copy specific region data out from the current touch map. Only used in KEYTM_REGIONS mode...
Definition: key.c:154
KEYMODE KEYSetTM(KEYMODE mode)
Set mode for key touch map.
Definition: key.c:36
KEYCODE KEYGet(void)
Wait for a touch event and return keycode (including KEY_INVALID - undefined keycode).
Definition: key.c:332
Structure defining a rectangular box on the LCD.
Definition: types.h:194
int KEYInit(void)
Open the evdev device file for reading touch events. Load the key configuration file (if found)...
Definition: key.c:19
KEYCODE KEYDecode(TOUCH_EVENT *rawtouch)
Decode raw touch info into a keycode based on the current touch map. Mainly used for testing...
Definition: key.c:213
int KEYGetRAW(TOUCH_EVENT *rawtouch)
Gets raw touch info - a non-blocking function. Mainly used for calibration and testing.
Definition: key.c:194
Structure representing the coordinates of a point.
Definition: types.h:186
Structure defining touchscreen presses.
Definition: types.h:213
int KEYIdle(int idle)
Enable/disable event checking procedure.
Definition: key.c:296
int KEYNoTouch(TOUCH_EVENT *rawtouch)
Validate there's no touch on screen surface.
Definition: key.c:172
int KEYSetRegion(int index, BOX *region)
Manually set region data into current touch map. Only used in KEYTM_REGIONS mode. If region is 0x0...
Definition: key.c:136
int KEYXY(int *x, int *y)
Wait for a touch event and return the XY-coordinate.
Definition: key.c:374
int KEYRelease(void)
Close the evdev device file and stop checking any key touch event.
Definition: key.c:255
KEYMODE KEYGetTM(TOUCH_MAP **ptouch_map)
Get current mode and touch map (region map).
Definition: key.c:114
int inside(int x, int y, BOX rect)
Check if a point is inside a rectangle.
Definition: key.c:274
KEYCODE KEYRead(void)
Read a keycode and returns. Function does not wait, thus includes KEY_TIMEOUT.
Definition: key.c:391
COORD_PAIR KEYGetXY(void)
Wait for a touch event and return the XY-coordinate.
Definition: key.c:351