Mercurial > fife-parpg
annotate engine/core/eventchannel/key/ec_key.h @ 526:c916d7b7de1c
Added the goldstack image as I forgot to add it before.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 28 May 2010 04:15:56 +0000 |
parents | bb9902910067 |
children |
rev | line source |
---|---|
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
1 /*************************************************************************** |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
2 * Copyright (C) 2005-2008 by the FIFE team * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
3 * http://www.fifengine.de * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
4 * This file is part of FIFE. * |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
5 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
6 * FIFE is free software; you can redistribute it and/or * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
7 * modify it under the terms of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
8 * License as published by the Free Software Foundation; either * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
9 * version 2.1 of the License, or (at your option) any later version. * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
10 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
14 * Lesser General Public License for more details. * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
15 * * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
16 * You should have received a copy of the GNU Lesser General Public * |
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
17 * License along with this library; if not, write to the * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
18 * Free Software Foundation, Inc., * |
46
90005975cdbb
* Final LGPL switch step by adjusting the file headers
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
0
diff
changeset
|
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
20 ***************************************************************************/ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
21 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
22 #ifndef FIFE_EVENTCHANNEL_KEY_H |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
23 #define FIFE_EVENTCHANNEL_KEY_H |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
24 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
25 // Standard C++ library includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
26 // |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
27 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
28 // 3rd party library includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
29 // |
111
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
30 #include <SDL.h> |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
31 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
32 // FIFE includes |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
33 // These includes are split up in two parts, separated by one empty line |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
34 // First block: files included from the FIFE root src directory |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
35 // Second block: files included from the same folder |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
36 // |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
37 namespace FIFE { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
38 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
39 /** Represents a key or a character. |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
40 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
41 class Key { |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
42 public: |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
43 /** Codes for different keys |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
44 */ |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
45 enum KeyType { |
111
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
46 INVALID_KEY = -1, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
47 BACKSPACE = SDLK_BACKSPACE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
48 TAB = SDLK_TAB, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
49 CLEAR = SDLK_CLEAR, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
50 ENTER = SDLK_RETURN, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
51 PAUSE = SDLK_PAUSE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
52 ESCAPE = SDLK_ESCAPE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
53 SPACE = SDLK_SPACE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
54 EXCLAIM = SDLK_EXCLAIM, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
55 QUOTEDBL = SDLK_QUOTEDBL, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
56 HASH = SDLK_HASH, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
57 DOLLAR = SDLK_DOLLAR, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
58 AMPERSAND = SDLK_AMPERSAND, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
59 QUOTE = SDLK_QUOTE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
60 LEFTPAREN = SDLK_LEFTPAREN, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
61 RIGHTPAREN = SDLK_RIGHTPAREN, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
62 ASTERISK = SDLK_ASTERISK, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
63 PLUS = SDLK_PLUS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
64 COMMA = SDLK_COMMA, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
65 MINUS = SDLK_MINUS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
66 PERIOD = SDLK_PERIOD, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
67 SLASH = SDLK_SLASH, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
68 NUM_0 = SDLK_0, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
69 NUM_1 = SDLK_1, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
70 NUM_2 = SDLK_2, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
71 NUM_3 = SDLK_3, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
72 NUM_4 = SDLK_4, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
73 NUM_5 = SDLK_5, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
74 NUM_6 = SDLK_6, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
75 NUM_7 = SDLK_7, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
76 NUM_8 = SDLK_8, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
77 NUM_9 = SDLK_9, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
78 COLON = SDLK_COLON, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
79 SEMICOLON = SDLK_SEMICOLON, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
80 LESS = SDLK_LESS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
81 EQUALS = SDLK_EQUALS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
82 GREATER = SDLK_GREATER, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
83 QUESTION = SDLK_QUESTION, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
84 AT = SDLK_AT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
85 LEFTBRACKET = SDLK_LEFTBRACKET, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
86 BACKSLASH = SDLK_BACKSLASH, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
87 RIGHTBRACKET = SDLK_RIGHTBRACKET, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
88 CARET = SDLK_CARET, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
89 UNDERSCORE = SDLK_UNDERSCORE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
90 BACKQUOTE = SDLK_BACKQUOTE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
91 A = SDLK_a, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
92 B = SDLK_b, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
93 C = SDLK_c, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
94 D = SDLK_d, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
95 E = SDLK_e, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
96 F = SDLK_f, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
97 G = SDLK_g, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
98 H = SDLK_h, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
99 I = SDLK_i, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
100 J = SDLK_j, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
101 K = SDLK_k, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
102 L = SDLK_l, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
103 M = SDLK_m, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
104 N = SDLK_n, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
105 O = SDLK_o, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
106 P = SDLK_p, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
107 Q = SDLK_q, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
108 R = SDLK_r, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
109 S = SDLK_s, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
110 T = SDLK_t, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
111 U = SDLK_u, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
112 V = SDLK_v, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
113 W = SDLK_w, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
114 X = SDLK_x, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
115 Y = SDLK_y, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
116 Z = SDLK_z, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
117 DELETE = SDLK_DELETE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
118 WORLD_0 = SDLK_WORLD_0, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
119 WORLD_1 = SDLK_WORLD_1, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
120 WORLD_2 = SDLK_WORLD_2, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
121 WORLD_3 = SDLK_WORLD_3, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
122 WORLD_4 = SDLK_WORLD_4, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
123 WORLD_5 = SDLK_WORLD_5, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
124 WORLD_6 = SDLK_WORLD_6, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
125 WORLD_7 = SDLK_WORLD_7, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
126 WORLD_8 = SDLK_WORLD_8, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
127 WORLD_9 = SDLK_WORLD_9, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
128 WORLD_10 = SDLK_WORLD_10, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
129 WORLD_11 = SDLK_WORLD_11, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
130 WORLD_12 = SDLK_WORLD_12, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
131 WORLD_13 = SDLK_WORLD_13, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
132 WORLD_14 = SDLK_WORLD_14, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
133 WORLD_15 = SDLK_WORLD_15, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
134 WORLD_16 = SDLK_WORLD_16, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
135 WORLD_17 = SDLK_WORLD_17, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
136 WORLD_18 = SDLK_WORLD_18, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
137 WORLD_19 = SDLK_WORLD_19, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
138 WORLD_20 = SDLK_WORLD_20, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
139 WORLD_21 = SDLK_WORLD_21, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
140 WORLD_22 = SDLK_WORLD_22, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
141 WORLD_23 = SDLK_WORLD_23, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
142 WORLD_24 = SDLK_WORLD_24, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
143 WORLD_25 = SDLK_WORLD_25, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
144 WORLD_26 = SDLK_WORLD_26, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
145 WORLD_27 = SDLK_WORLD_27, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
146 WORLD_28 = SDLK_WORLD_28, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
147 WORLD_29 = SDLK_WORLD_29, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
148 WORLD_30 = SDLK_WORLD_30, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
149 WORLD_31 = SDLK_WORLD_31, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
150 WORLD_32 = SDLK_WORLD_32, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
151 WORLD_33 = SDLK_WORLD_33, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
152 WORLD_34 = SDLK_WORLD_34, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
153 WORLD_35 = SDLK_WORLD_35, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
154 WORLD_36 = SDLK_WORLD_36, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
155 WORLD_37 = SDLK_WORLD_37, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
156 WORLD_38 = SDLK_WORLD_38, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
157 WORLD_39 = SDLK_WORLD_39, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
158 WORLD_40 = SDLK_WORLD_40, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
159 WORLD_41 = SDLK_WORLD_41, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
160 WORLD_42 = SDLK_WORLD_42, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
161 WORLD_43 = SDLK_WORLD_43, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
162 WORLD_44 = SDLK_WORLD_44, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
163 WORLD_45 = SDLK_WORLD_45, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
164 WORLD_46 = SDLK_WORLD_46, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
165 WORLD_47 = SDLK_WORLD_47, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
166 WORLD_48 = SDLK_WORLD_48, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
167 WORLD_49 = SDLK_WORLD_49, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
168 WORLD_50 = SDLK_WORLD_50, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
169 WORLD_51 = SDLK_WORLD_51, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
170 WORLD_52 = SDLK_WORLD_52, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
171 WORLD_53 = SDLK_WORLD_53, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
172 WORLD_54 = SDLK_WORLD_54, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
173 WORLD_55 = SDLK_WORLD_55, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
174 WORLD_56 = SDLK_WORLD_56, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
175 WORLD_57 = SDLK_WORLD_57, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
176 WORLD_58 = SDLK_WORLD_58, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
177 WORLD_59 = SDLK_WORLD_59, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
178 WORLD_60 = SDLK_WORLD_60, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
179 WORLD_61 = SDLK_WORLD_61, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
180 WORLD_62 = SDLK_WORLD_62, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
181 WORLD_63 = SDLK_WORLD_63, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
182 WORLD_64 = SDLK_WORLD_64, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
183 WORLD_65 = SDLK_WORLD_65, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
184 WORLD_66 = SDLK_WORLD_66, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
185 WORLD_67 = SDLK_WORLD_67, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
186 WORLD_68 = SDLK_WORLD_68, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
187 WORLD_69 = SDLK_WORLD_69, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
188 WORLD_70 = SDLK_WORLD_70, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
189 WORLD_71 = SDLK_WORLD_71, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
190 WORLD_72 = SDLK_WORLD_72, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
191 WORLD_73 = SDLK_WORLD_73, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
192 WORLD_74 = SDLK_WORLD_74, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
193 WORLD_75 = SDLK_WORLD_75, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
194 WORLD_76 = SDLK_WORLD_76, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
195 WORLD_77 = SDLK_WORLD_77, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
196 WORLD_78 = SDLK_WORLD_78, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
197 WORLD_79 = SDLK_WORLD_79, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
198 WORLD_80 = SDLK_WORLD_80, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
199 WORLD_81 = SDLK_WORLD_81, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
200 WORLD_82 = SDLK_WORLD_82, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
201 WORLD_83 = SDLK_WORLD_83, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
202 WORLD_84 = SDLK_WORLD_84, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
203 WORLD_85 = SDLK_WORLD_85, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
204 WORLD_86 = SDLK_WORLD_86, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
205 WORLD_87 = SDLK_WORLD_87, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
206 WORLD_88 = SDLK_WORLD_88, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
207 WORLD_89 = SDLK_WORLD_89, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
208 WORLD_90 = SDLK_WORLD_90, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
209 WORLD_91 = SDLK_WORLD_91, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
210 WORLD_92 = SDLK_WORLD_92, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
211 WORLD_93 = SDLK_WORLD_93, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
212 WORLD_94 = SDLK_WORLD_94, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
213 WORLD_95 = SDLK_WORLD_95, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
214 KP0 = SDLK_KP0, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
215 KP1 = SDLK_KP1, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
216 KP2 = SDLK_KP2, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
217 KP3 = SDLK_KP3, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
218 KP4 = SDLK_KP4, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
219 KP5 = SDLK_KP5, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
220 KP6 = SDLK_KP6, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
221 KP7 = SDLK_KP7, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
222 KP8 = SDLK_KP8, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
223 KP9 = SDLK_KP9, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
224 KP_PERIOD = SDLK_KP_PERIOD, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
225 KP_DIVIDE = SDLK_KP_DIVIDE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
226 KP_MULTIPLY = SDLK_KP_MULTIPLY, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
227 KP_MINUS = SDLK_KP_MINUS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
228 KP_PLUS = SDLK_KP_PLUS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
229 KP_ENTER = SDLK_KP_ENTER, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
230 KP_EQUALS = SDLK_KP_EQUALS, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
231 UP = SDLK_UP, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
232 DOWN = SDLK_DOWN, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
233 RIGHT = SDLK_RIGHT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
234 LEFT = SDLK_LEFT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
235 INSERT = SDLK_INSERT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
236 HOME = SDLK_HOME, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
237 END = SDLK_END, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
238 PAGE_UP = SDLK_PAGEUP, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
239 PAGE_DOWN = SDLK_PAGEDOWN, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
240 F1 = SDLK_F1, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
241 F2 = SDLK_F2, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
242 F3 = SDLK_F3, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
243 F4 = SDLK_F4, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
244 F5 = SDLK_F5, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
245 F6 = SDLK_F6, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
246 F7 = SDLK_F7, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
247 F8 = SDLK_F8, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
248 F9 = SDLK_F9, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
249 F10 = SDLK_F10, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
250 F11 = SDLK_F11, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
251 F12 = SDLK_F12, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
252 F13 = SDLK_F13, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
253 F14 = SDLK_F14, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
254 F15 = SDLK_F15, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
255 NUM_LOCK = SDLK_NUMLOCK, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
256 CAPS_LOCK = SDLK_CAPSLOCK, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
257 SCROLL_LOCK = SDLK_SCROLLOCK, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
258 RIGHT_SHIFT = SDLK_RSHIFT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
259 LEFT_SHIFT = SDLK_LSHIFT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
260 RIGHT_CONTROL = SDLK_RCTRL, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
261 LEFT_CONTROL = SDLK_LCTRL, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
262 RIGHT_ALT = SDLK_RALT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
263 LEFT_ALT = SDLK_LALT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
264 RIGHT_META = SDLK_RMETA, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
265 LEFT_META = SDLK_LMETA, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
266 RIGHT_SUPER = SDLK_RSUPER, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
267 LEFT_SUPER = SDLK_LSUPER, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
268 ALT_GR = SDLK_MODE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
269 COMPOSE = SDLK_COMPOSE, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
270 HELP = SDLK_HELP, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
271 PRINT_SCREEN = SDLK_PRINT, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
272 SYSREQ = SDLK_SYSREQ, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
273 BREAK = SDLK_BREAK, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
274 MENU = SDLK_MENU, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
275 POWER = SDLK_POWER, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
276 EURO = SDLK_EURO, |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
277 UNDO = SDLK_UNDO |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
278 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
279 |
111
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
280 /** Constructor |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
281 * @param value value of the key |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
282 * @param codepoint Unicode representation of the key |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
283 */ |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
284 Key(KeyType key = INVALID_KEY, uint32_t codepoint = 0): |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
285 m_key(key), |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
286 m_unicode(codepoint) {} |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
287 |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
288 /** Destructor. |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
289 */ |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
290 virtual ~Key() {} |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
291 |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
292 /** Tells whether the Key can be represented as a string. |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
293 */ |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
294 bool isPrintable() const { |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
295 // Unicode does not have control characters, so this should be sufficient |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
296 return m_unicode != 0; |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
297 } |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
298 |
157
bb9902910067
input_rework merged!
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
111
diff
changeset
|
299 bool isFunctionKey() const { |
bb9902910067
input_rework merged!
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
111
diff
changeset
|
300 return m_key >= F1 && m_key <= F15; |
bb9902910067
input_rework merged!
phoku@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
111
diff
changeset
|
301 } |
111
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
302 |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
303 /** Gets the value of the key. |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
304 */ |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
305 KeyType getValue() const { |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
306 return m_key; |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
307 } |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
308 |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
309 /** Gets the string representation of the key, encoded as UTF-8. |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
310 */ |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
311 std::string getAsString() const { |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
312 // older sdl versions have the 3rd argument non const, but it is in fact const... |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
313 char* converted = SDL_iconv_string("UTF-8", "UTF-32", |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
314 const_cast<char*>(reinterpret_cast<const char*>(&m_unicode)), 4); |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
315 std::string retval(converted); |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
316 SDL_free(converted); |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
317 return retval; |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
318 } |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
319 |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
320 private: |
111
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
321 KeyType m_key; |
abfe54ebae15
fix key event, patch by yonibear
spq@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
46
diff
changeset
|
322 uint32_t m_unicode; |
0
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
323 }; |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
324 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
325 } //FIFE |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
326 |
4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff
changeset
|
327 #endif |