1 /* keys.h    -- Display key definitions
2  * $Id $
3  * Copyright (C) 2000 Ryan Phillips <bitman@users.sourceforge.net>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place Suite 330; Boston, MA 02111-1307, USA.
18  */
19 
20 #ifndef DISPLAY_KEYS_H
21 #define DISPLAY_KEYS_H 1
22 
23 /* Undefined key or no key pressed */
24 #define DKEY_NONE       0x00
25 
26 /* DOS extended key */
27 #define DDOSKEY_EXT     0x1000
28 
29 /* Standard action keys */
30 #define DKEY_ENTER      13
31 #define DKEY_ESC        27
32 #define DKEY_BACKSPACE  '\b'
33 #define DKEY_TAB        '\t'
34 
35 #define DKEY_SHIFT_TAB  (15 | DDOSKEY_EXT)
36 
37 /* Arrow keys */
38 #define DKEY_UP         (0x48 | DDOSKEY_EXT)
39 #define DKEY_DOWN       (0x50 | DDOSKEY_EXT)
40 #define DKEY_LEFT       (0x4B | DDOSKEY_EXT)
41 #define DKEY_RIGHT      (0x4D | DDOSKEY_EXT)
42 
43 /* Navigation keys */
44 #define DKEY_INSERT     (0x52 | DDOSKEY_EXT)
45 #define DKEY_DELETE     (0x53 | DDOSKEY_EXT)
46 #define DKEY_HOME       (0x47 | DDOSKEY_EXT)
47 #define DKEY_END        (0x4F | DDOSKEY_EXT)
48 #define DKEY_PAGEUP     (0x49 | DDOSKEY_EXT)
49 #define DKEY_PAGEDOWN   (0x51 | DDOSKEY_EXT)
50 
51 /* Function keys */
52 #define DKEY_F1         (0x3B | DDOSKEY_EXT)
53 #define DKEY_F2         (0x3C | DDOSKEY_EXT)
54 #define DKEY_F3         (0x3D | DDOSKEY_EXT)
55 #define DKEY_F4         (0x3E | DDOSKEY_EXT)
56 #define DKEY_F5         (0x3F | DDOSKEY_EXT)
57 #define DKEY_F6         (0x40 | DDOSKEY_EXT)
58 #define DKEY_F7         (0x41 | DDOSKEY_EXT)
59 #define DKEY_F8         (0x42 | DDOSKEY_EXT)
60 #define DKEY_F9         (0x43 | DDOSKEY_EXT)
61 #define DKEY_F10        (0x44 | DDOSKEY_EXT)
62 #define DKEY_F11        (0x85 | DDOSKEY_EXT)
63 #define DKEY_F12        (0x86 | DDOSKEY_EXT)
64 
65 /* Alt-arrow keys */
66 #define DKEY_ALT_LEFT   (155 | DDOSKEY_EXT)
67 #define DKEY_ALT_RIGHT  (157 | DDOSKEY_EXT)
68 #define DKEY_ALT_UP     (152 | DDOSKEY_EXT)
69 #define DKEY_ALT_DOWN   (160 | DDOSKEY_EXT)
70 
71 /* Ctrl-letter keys */
72 #define DKEY_CTRL_A     ('a' - 0x60)
73 #define DKEY_CTRL_B     ('b' - 0x60)
74 #define DKEY_CTRL_C     ('c' - 0x60)
75 #define DKEY_CTRL_D     ('d' - 0x60)
76 #define DKEY_CTRL_E     ('e' - 0x60)
77 #define DKEY_CTRL_F     ('f' - 0x60)
78 #define DKEY_CTRL_G     ('g' - 0x60)
79 #define DKEY_CTRL_H     ('h' - 0x60)  /* Same as BS */
80 #define DKEY_CTRL_I     ('i' - 0x60)  /* Same as TAB */
81 #define DKEY_CTRL_J     ('j' - 0x60)
82 #define DKEY_CTRL_K     ('k' - 0x60)
83 #define DKEY_CTRL_L     ('l' - 0x60)
84 #define DKEY_CTRL_M     ('m' - 0x60)  /* Same as ENTER */
85 #define DKEY_CTRL_N     ('n' - 0x60)
86 #define DKEY_CTRL_O     ('o' - 0x60)
87 #define DKEY_CTRL_P     ('p' - 0x60)
88 #define DKEY_CTRL_Q     ('q' - 0x60)
89 #define DKEY_CTRL_R     ('r' - 0x60)
90 #define DKEY_CTRL_S     ('s' - 0x60)
91 #define DKEY_CTRL_T     ('t' - 0x60)
92 #define DKEY_CTRL_U     ('u' - 0x60)
93 #define DKEY_CTRL_V     ('v' - 0x60)
94 #define DKEY_CTRL_W     ('w' - 0x60)
95 #define DKEY_CTRL_X     ('x' - 0x60)
96 #define DKEY_CTRL_Y     ('y' - 0x60)
97 #define DKEY_CTRL_Z     ('z' - 0x60)
98 
99 #define DKEY_CTRL_DELETE  (147 | DDOSKEY_EXT)
100 
101 /* Alt-letter keys */
102 #define DKEY_ALT_I      (23 | DDOSKEY_EXT)
103 #define DKEY_ALT_M      (50 | DDOSKEY_EXT)
104 #define DKEY_ALT_O      (24 | DDOSKEY_EXT)
105 #define DKEY_ALT_S      (31 | DDOSKEY_EXT)
106 #define DKEY_ALT_T      (20 | DDOSKEY_EXT)
107 #define DKEY_ALT_Z      (44 | DDOSKEY_EXT)
108 
109 #define DKEY_ALT_MINUS  (130 | DDOSKEY_EXT)
110 /* TODO: make alt + different from alt = */
111 #define DKEY_ALT_PLUS   (131 | DDOSKEY_EXT)
112 #define DKEY_ALT_EQUALS (131 | DDOSKEY_EXT)
113 
114 
115 #endif
116