libvisual  0.5.0
lv_keysym.h
1 /* Libvisual - The audio visualisation framework.
2  *
3  * Copyright (C) 2012 Libvisual team
4  * 2004-2006 Dennis Smit
5  *
6  * Authors: Dennis Smit <ds@nerds-incorporated.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as
10  * published by the Free Software Foundation; either version 2.1
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21  */
22 
23 #ifndef _LV_KEYSYM_H
24 #define _LV_KEYSYM_H
25 
37 typedef enum {
38  VKEY_UNKNOWN = 0,
39  VKEY_FIRST = 0,
40  VKEY_BACKSPACE = 8,
41  VKEY_TAB = 9,
42  VKEY_CLEAR = 12,
43  VKEY_RETURN = 13,
44  VKEY_PAUSE = 19,
45  VKEY_ESCAPE = 27,
46  VKEY_SPACE = 32,
47  VKEY_EXCLAIM = 33,
48  VKEY_QUOTEDBL = 34,
49  VKEY_HASH = 35,
50  VKEY_DOLLAR = 36,
51  VKEY_AMPERSAND = 38,
52  VKEY_QUOTE = 39,
53  VKEY_LEFTPAREN = 40,
54  VKEY_RIGHTPAREN = 41,
55  VKEY_ASTERISK = 42,
56  VKEY_PLUS = 43,
57  VKEY_COMMA = 44,
58  VKEY_MINUS = 45,
59  VKEY_PERIOD = 46,
60  VKEY_SLASH = 47,
61  VKEY_0 = 48,
62  VKEY_1 = 49,
63  VKEY_2 = 50,
64  VKEY_3 = 51,
65  VKEY_4 = 52,
66  VKEY_5 = 53,
67  VKEY_6 = 54,
68  VKEY_7 = 55,
69  VKEY_8 = 56,
70  VKEY_9 = 57,
71  VKEY_COLON = 58,
72  VKEY_SEMICOLON = 59,
73  VKEY_LESS = 60,
74  VKEY_EQUALS = 61,
75  VKEY_GREATER = 62,
76  VKEY_QUESTION = 63,
77  VKEY_AT = 64,
78 
79  /* Skip uppercase here because it's done via the VisKeyMod */
80  VKEY_LEFTBRACKET = 91,
81  VKEY_BACKSLASH = 92,
82  VKEY_RIGHTBRACKET = 93,
83  VKEY_CARET = 94,
84  VKEY_UNDERSCORE = 95,
85  VKEY_BACKQUOTE = 96,
86  VKEY_a = 97,
87  VKEY_b = 98,
88  VKEY_c = 99,
89  VKEY_d = 100,
90  VKEY_e = 101,
91  VKEY_f = 102,
92  VKEY_g = 103,
93  VKEY_h = 104,
94  VKEY_i = 105,
95  VKEY_j = 106,
96  VKEY_k = 107,
97  VKEY_l = 108,
98  VKEY_m = 109,
99  VKEY_n = 110,
100  VKEY_o = 111,
101  VKEY_p = 112,
102  VKEY_q = 113,
103  VKEY_r = 114,
104  VKEY_s = 115,
105  VKEY_t = 116,
106  VKEY_u = 117,
107  VKEY_v = 118,
108  VKEY_w = 119,
109  VKEY_x = 120,
110  VKEY_y = 121,
111  VKEY_z = 122,
112  VKEY_DELETE = 127,
113 
114  /* Numeric keypad */
115  VKEY_KP0 = 256,
116  VKEY_KP1 = 257,
117  VKEY_KP2 = 258,
118  VKEY_KP3 = 259,
119  VKEY_KP4 = 260,
120  VKEY_KP5 = 261,
121  VKEY_KP6 = 262,
122  VKEY_KP7 = 263,
123  VKEY_KP8 = 264,
124  VKEY_KP9 = 265,
125  VKEY_KP_PERIOD = 266,
126  VKEY_KP_DIVIDE = 267,
127  VKEY_KP_MULTIPLY = 268,
128  VKEY_KP_MINUS = 269,
129  VKEY_KP_PLUS = 270,
130  VKEY_KP_ENTER = 271,
131  VKEY_KP_EQUALS = 272,
132 
133  /* Arrows + Home/End pad */
134  VKEY_UP = 273,
135  VKEY_DOWN = 274,
136  VKEY_RIGHT = 275,
137  VKEY_LEFT = 276,
138  VKEY_INSERT = 277,
139  VKEY_HOME = 278,
140  VKEY_END = 279,
141  VKEY_PAGEUP = 280,
142  VKEY_PAGEDOWN = 281,
143 
144  /* Function keys */
145  VKEY_F1 = 282,
146  VKEY_F2 = 283,
147  VKEY_F3 = 284,
148  VKEY_F4 = 285,
149  VKEY_F5 = 286,
150  VKEY_F6 = 287,
151  VKEY_F7 = 288,
152  VKEY_F8 = 289,
153  VKEY_F9 = 290,
154  VKEY_F10 = 291,
155  VKEY_F11 = 292,
156  VKEY_F12 = 293,
157  VKEY_F13 = 294,
158  VKEY_F14 = 295,
159  VKEY_F15 = 296,
160 
161  /* Key state modifier keys */
162  VKEY_NUMLOCK = 300,
163  VKEY_CAPSLOCK = 301,
164  VKEY_SCROLLOCK = 302,
165  VKEY_RSHIFT = 303,
166  VKEY_LSHIFT = 304,
167  VKEY_RCTRL = 305,
168  VKEY_LCTRL = 306,
169  VKEY_RALT = 307,
170  VKEY_LALT = 308,
171  VKEY_RMETA = 309,
172  VKEY_LMETA = 310,
173  VKEY_LSUPER = 311, /* Left "Windows" key */
174  VKEY_RSUPER = 312, /* Right "Windows" key */
175  VKEY_MODE = 313, /* "Alt Gr" key */
176  VKEY_COMPOSE = 314, /* Multi-key compose key */
177 
178  /* Miscellaneous function keys */
179  VKEY_HELP = 315,
180  VKEY_PRINT = 316,
181  VKEY_SYSREQ = 317,
182  VKEY_BREAK = 318,
183  VKEY_MENU = 319,
184 
185  VKEY_LAST
186 } VisKey;
187 
195 typedef enum {
196  VKMOD_NONE = 0x0000,
197  VKMOD_LSHIFT = 0x0001,
198  VKMOD_RSHIFT = 0x0002,
199  VKMOD_LCTRL = 0x0040,
200  VKMOD_RCTRL = 0x0080,
201  VKMOD_LALT = 0x0100,
202  VKMOD_RALT = 0x0200,
203  VKMOD_LMETA = 0x0400,
204  VKMOD_RMETA = 0x0800,
205  VKMOD_NUM = 0x1000,
206  VKMOD_CAPS = 0x2000,
207  VKMOD_MODE = 0x4000
208 } VisKeyMod;
209 
210 #define VKMOD_CTRL (VKMOD_LCTRL | VKMOD_RCTRL)
211 #define VKMOD_SHIFT (VKMOD_LSHIFT | VKMOD_RSHIFT)
212 #define VKMOD_ALT (VKMOD_LALT | VKMOD_RALT)
213 #define VKMOD_META (VKMOD_LMETA | VKMOD_RMETA)
214 
215 typedef struct _VisKeySym VisKeySym;
216 
220 struct _VisKeySym {
221  VisKey sym;
222  VisKeyMod mod;
223 };
224 
225 #endif /* _LV_KEYSYM_H */