Root/
Source at commit 2740 created 8 years 11 months ago. By ifabio, sync with trunk. | |
---|---|
1 | /*␊ |
2 | * term.h␊ |
3 | * Chameleon␊ |
4 | *␊ |
5 | * Created by JrCs on 30/08/11.␊ |
6 | * Copyright 2011. All rights reserved.␊ |
7 | *␊ |
8 | */␊ |
9 | ␊ |
10 | #ifndef __LIBSAIO_TERM_H␊ |
11 | #define __LIBSAIO_TERM_H␊ |
12 | ␊ |
13 | #define ASCII_KEY_MASK 0x7f␊ |
14 | #define ASCII_KEY(x) ((x & ASCII_KEY_MASK))␊ |
15 | ␊ |
16 | #define KEY_BKSP 0x0008␊ |
17 | #define KEY_TAB 0x0009␊ |
18 | #define KEY_ENTER 0x000d␊ |
19 | #define KEY_ESC 0x001b␊ |
20 | #define KEY_PRTSC 0x002a␊ |
21 | #define KEY_LEFT 0x4b00␊ |
22 | #define KEY_RIGHT 0x4d00␊ |
23 | #define KEY_UP 0x4800␊ |
24 | #define KEY_DOWN 0x5000␊ |
25 | #define KEY_HOME 0x4700␊ |
26 | #define KEY_END 0x4f00␊ |
27 | #define KEY_CENTER 0x4c00␊ |
28 | #define KEY_INS 0x5200␊ |
29 | #define KEY_DEL 0x5300␊ |
30 | #define KEY_PGUP 0x4900␊ |
31 | #define KEY_PGDN 0x5100␊ |
32 | #define KEY_F1 0x3b00␊ |
33 | #define KEY_F2 0x3c00␊ |
34 | #define KEY_F3 0x3d00␊ |
35 | #define KEY_F4 0x3e00␊ |
36 | #define KEY_F5 0x3f00␊ |
37 | #define KEY_F6 0x4000␊ |
38 | #define KEY_F7 0x4100␊ |
39 | #define KEY_F8 0x4200␊ |
40 | #define KEY_F9 0x4300␊ |
41 | #define KEY_F10 0x4400␊ |
42 | #define KEY_F11 0x5700␊ |
43 | #define KEY_F12 0x5800␊ |
44 | ␊ |
45 | // Key code for input that shouldn't echoed back␊ |
46 | #define KEY_NOECHO 0xff00␊ |
47 | ␊ |
48 | /* Bitmasks for modifier keys */␊ |
49 | #define STATUS_RSHIFT (1 << 0)␊ |
50 | #define STATUS_LSHIFT (1 << 1)␊ |
51 | #define STATUS_RCTRL (1 << 2)␊ |
52 | #define STATUS_RALT (1 << 3)␊ |
53 | #define STATUS_SCROLL (1 << 4)␊ |
54 | #define STATUS_NUM (1 << 5)␊ |
55 | #define STATUS_CAPS (1 << 6)␊ |
56 | #define STATUS_LCTRL (1 << 8)␊ |
57 | #define STATUS_LALT (1 << 9)␊ |
58 | ␊ |
59 | #endif /* !__LIBSAIO_TERM_H */␊ |
60 |