OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
CocoaKeycodeMap.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2010-2016, The OpenClonk Team and contributors
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #define K(k,s,a) {k+CocoaKeycodeOffset,s,a}
18 {
19  { K_BACK , "Backspace" , nullptr },
20  { K_TAB , "Tab" , nullptr },
21  //{ VK_CLEAR , "Clear" , nullptr },
22  { K_RETURN , "Return" , nullptr },
23 
24  { K_SHIFT_L , "LeftShift" , "LShift" },
25  { K_SHIFT_R , "RightShift" , "RShift" },
26  { K_CONTROL_L , "LeftControl" , "LCtrl" },
27  { K_CONTROL_R , "RightControl" , "RCtrl" },
28  { K_ALT_L , "LeftAlt" , "LAlt" },
29  { K_ALT_R , "RightAlt" , "RAlt" },
30  { K_PAUSE , "Pause" , nullptr },
31 
32 /* K( VK_CAPITAL , "Capital" , nullptr ),
33  K( VK_KANA , "Kana" , nullptr ),
34  K( VK_HANGEUL , "Hangeul" , nullptr ),
35  K( VK_HANGUL , "Hangul" , nullptr ),
36  K( VK_JUNJA , "Junja" , nullptr ),
37  K( VK_FINAL , "Final" , nullptr ),
38  K( VK_HANJA , "Hanja" , nullptr ),
39  K( VK_KANJI , "Kanji" , nullptr ),
40  K( VK_ESCAPE , "Escape" , "Esc" ),
41  K( VK_ESCAPE , "Esc" ,nullptr ),
42  K( VK_CONVERT , "Convert" , nullptr ),
43  K( VK_NONCONVERT , "Noconvert" , nullptr ),
44  K( VK_ACCEPT , "Accept" , nullptr ),
45  K( VK_MODECHANGE , "Modechange" , nullptr ),*/
46 
47  { K_SPACE , "Space" , "Sp" },
48 
49  { K_END , "End" , nullptr },
50  { K_HOME , "Home" , nullptr },
51  { K_LEFT , "Left" , nullptr },
52  { K_UP , "Up" , nullptr },
53  { K_RIGHT , "Right" , nullptr },
54  { K_DOWN , "Down" , nullptr },
55  /*{ VK_SELECT , "Select" , nullptr },
56  { VK_PRINT , "Print" , nullptr },
57  { VK_EXECUTE , "Execute" , nullptr },
58  { VK_SNAPSHOT , "Snapshot" , nullptr },
59  { VK_INSERT , "Insert" , "Ins" },*/
60  { K_DELETE , "Delete" , "Del" },
61 // { VK_HELP , "Help" , nullptr },
62 
63  K( 29 , "0" , nullptr ),
64  K( 18 , "1" , nullptr ),
65  K( 19 , "2" , nullptr ),
66  K( 20 , "3" , nullptr ),
67  K( 21 , "4" , nullptr ),
68  K( 23 , "5" , nullptr ),
69  K( 22 , "6" , nullptr ),
70  K( 26 , "7" , nullptr ),
71  K( 28 , "8" , nullptr ),
72  K( 25 , "9" , nullptr ),
73 
74  K( 0 , "A" , nullptr ),
75  K( 11 , "B" , nullptr ),
76  K( 8 , "C" , nullptr ),
77  K( 2 , "D" , nullptr ),
78  K( 14 , "E" , nullptr ),
79  K( 3 , "F" , nullptr ),
80  K( 5 , "G" , nullptr ),
81  K( 4 , "H" , nullptr ),
82  K( 34 , "I" , nullptr ),
83  K( 38 , "J" , nullptr ),
84  K( 40 , "K" , nullptr ),
85  K( 37 , "L" , nullptr ),
86  K( 46 , "M" , nullptr ),
87  K( 45 , "N" , nullptr ),
88  K( 31 , "O" , nullptr ),
89  K( 35 , "P" , nullptr ),
90  K( 12 , "Q" , nullptr ),
91  K( 15 , "R" , nullptr ),
92  K( 1 , "S" , nullptr ),
93  K( 17 , "T" , nullptr ),
94  K( 32 , "U" , nullptr ),
95  K( 9 , "V" , nullptr ),
96  K( 13 , "W" , nullptr ),
97  K( 7 , "X" , nullptr ),
98  K( 6 , "Y" , nullptr ),
99  K( 16 , "Z" , nullptr ),
100  K( 43 , "Comma" , nullptr ),
101  K( 47 , "Period" , nullptr ),
102  K( 43 , "Apostrophe", nullptr ),
103  K( 44 , "Backslash" , nullptr ),
104  K( 43 , "Comma_US" , nullptr ),
105  K( 49 , "Less" , nullptr ),
106 
107  /*K( VK_LWIN , "WinLeft" , nullptr ),
108  K( VK_RWIN , "WinRight" , nullptr ),*/
109  //K( VK_APPS , "Apps" , nullptr ),
110 
111  K( 82 , "Num0" , "N0" ),
112  K( 83 , "Num1" , "N1" ),
113  K( 84 , "Num2" , "N2" ),
114  K( 85 , "Num3" , "N3" ),
115  K( 86 , "Num4" , "N4" ),
116  K( 87 , "Num5" , "N5" ),
117  K( 88 , "Num6" , "N6" ),
118  K( 89 , "Num7" , "N7" ),
119  K( 91 , "Num8" , "N8" ),
120  K( 92 , "Num9" , "N9" ),
121  K( 67 , "Multiply" , "N*" ),
122  K( 69 , "Add" , "N+" ),
123  //K( 65 , "Separator" , "NSep" ),
124  K( 78 , "Subtract" , "N-" ),
125  K( 65 , "Decimal" , "N," ),
126  K( 75 , "Divide" , "N/" ),
127  { K_F1 , "F1" , nullptr },
128  { K_F2 , "F2" , nullptr },
129  { K_F3 , "F3" , nullptr },
130  { K_F4 , "F4" , nullptr },
131  { K_F5 , "F5" , nullptr },
132  { K_F6 , "F6" , nullptr },
133  { K_F7 , "F7" , nullptr },
134  { K_F8 , "F8" , nullptr },
135  { K_F9 , "F9" , nullptr },
136  { K_F10 , "F10" , nullptr },
137  { K_F11 , "F11" , nullptr },
138  { K_F12 , "F12" , nullptr },
139  /*
140  { K_F13 , "F13" , nullptr },
141  { K_F14 , "F14" , nullptr },
142  { K_F15 , "F15" , nullptr },
143  { K_F16 , "F16" , nullptr },
144  { K_F17 , "F17" , nullptr },
145  { K_F18 , "F18" , nullptr },
146  { K_F19 , "F19" , nullptr },
147  { K_F20 , "F20" , nullptr },
148  { K_F21 , "F21" , nullptr },
149  { K_F22 , "F22" , nullptr },
150  { K_F23 , "F23" , nullptr },
151  { K_F24 , "F24" , nullptr },*/
152  K( 71 , "NumLock" , "NLock" ),
153  //K( K_SCROLL , "Scroll" , nullptr ),
154 
155  //K( VK_PROCESSKEY , "PROCESSKEY" , nullptr ),
156 
157 /*#if defined VK_SLEEP && defined VK_OEM_NEC_EQUAL
158  K( VK_SLEEP , "Sleep" , nullptr ),
159 
160  K( VK_OEM_NEC_EQUAL , "OEM_NEC_EQUAL" , nullptr ),
161 
162  K( VK_OEM_FJ_JISHO , "OEM_FJ_JISHO" , nullptr ),
163  K( VK_OEM_FJ_MASSHOU , "OEM_FJ_MASSHOU" , nullptr ),
164  K( VK_OEM_FJ_TOUROKU , "OEM_FJ_TOUROKU" , nullptr ),
165  K( VK_OEM_FJ_LOYA , "OEM_FJ_LOYA" , nullptr ),
166  K( VK_OEM_FJ_ROYA , "OEM_FJ_ROYA" , nullptr ),
167 
168  K( VK_BROWSER_BACK , "BROWSER_BACK" , nullptr ),
169  K( VK_BROWSER_FORWARD , "BROWSER_FORWARD" , nullptr ),
170  K( VK_BROWSER_REFRESH , "BROWSER_REFRESH" , nullptr ),
171  K( VK_BROWSER_STOP , "BROWSER_STOP" , nullptr ),
172  K( VK_BROWSER_SEARCH , "BROWSER_SEARCH" , nullptr ),
173  K( VK_BROWSER_FAVORITES , "BROWSER_FAVORITES" , nullptr ),
174  K( VK_BROWSER_HOME , "BROWSER_HOME" , nullptr ),
175 
176  K( VK_VOLUME_MUTE , "VOLUME_MUTE" , nullptr ),
177  K( VK_VOLUME_DOWN , "VOLUME_DOWN" , nullptr ),
178  K( VK_VOLUME_UP , "VOLUME_UP" , nullptr ),
179  K( VK_MEDIA_NEXT_TRACK , "MEDIA_NEXT_TRACK" , nullptr ),
180  K( VK_MEDIA_PREV_TRACK , "MEDIA_PREV_TRACK" , nullptr ),
181  K( VK_MEDIA_STOP , "MEDIA_STOP" , nullptr ),
182  K( VK_MEDIA_PLAY_PAUSE , "MEDIA_PLAY_PAUSE" , nullptr ),
183  K( VK_LAUNCH_MAIL , "LAUNCH_MAIL" , nullptr ),
184  K( VK_LAUNCH_MEDIA_SELECT , "LAUNCH_MEDIA_SELECT" , nullptr ),
185  K( VK_LAUNCH_APP1 , "LAUNCH_APP1" , nullptr ),
186  K( VK_LAUNCH_APP2 , "LAUNCH_APP2" , nullptr ),
187 
188  K( VK_OEM_1 , "OEM Ü" , "Ü" ), // German hax
189  K( VK_OEM_PLUS , "OEM +" , "+" ),
190  K( VK_OEM_COMMA , "OEM ," , "," ),
191  K( VK_OEM_MINUS , "OEM -" , "-" ),
192  K( VK_OEM_PERIOD , "OEM ." , "." ),
193  K( VK_OEM_2 , "OEM 2" , "2" ),
194  K( VK_OEM_3 , "OEM Ö" , "Ö" ), // German hax
195  K( VK_OEM_4 , "OEM 4" , "4" ),
196  K( VK_OEM_5 , "OEM 5" , "5" ),
197  K( VK_OEM_6 , "OEM 6" , "6" ),
198  K( VK_OEM_7 , "OEM Ä" , "Ä" ), // German hax
199  K( VK_OEM_8 , "OEM 8" , "8" ),
200  K( VK_OEM_AX , "AX" , "AX" ),
201  K( VK_OEM_102 , "< > |" , "<" ), // German hax
202  K( VK_ICO_HELP , "Help" , "Help" ),
203  K( VK_ICO_00 , "ICO_00" , "00" ),
204 
205  K( VK_ICO_CLEAR , "ICO_CLEAR" , nullptr ),
206 
207  K( VK_PACKET , "PACKET" , nullptr ),
208 
209  K( VK_OEM_RESET , "OEM_RESET" , nullptr ),
210  K( VK_OEM_JUMP , "OEM_JUMP" , nullptr ),
211  K( VK_OEM_PA1 , "OEM_PA1" , nullptr ),
212  K( VK_OEM_PA2 , "OEM_PA2" , nullptr ),
213  K( VK_OEM_PA3 , "OEM_PA3" , nullptr ),
214  K( VK_OEM_WSCTRL , "OEM_WSCTRL" , nullptr ),
215  K( VK_OEM_CUSEL , "OEM_CUSEL" , nullptr ),
216  K( VK_OEM_ATTN , "OEM_ATTN" , nullptr ),
217  K( VK_OEM_FINISH , "OEM_FINISH" , nullptr ),
218  K( VK_OEM_COPY , "OEM_COPY" , nullptr ),
219  K( VK_OEM_AUTO , "OEM_AUTO" , nullptr ),
220  K( VK_OEM_ENLW , "OEM_ENLW" , nullptr ),
221  K( VK_OEM_BACKTAB , "OEM_BACKTAB" , nullptr ),
222 #endif
223 
224  K( VK_ATTN , "ATTN" , nullptr ),
225  K( VK_CRSEL , "CRSEL" , nullptr ),
226  K( VK_EXSEL , "EXSEL" , nullptr ),
227  K( VK_EREOF , "EREOF" , nullptr ),
228  K( VK_PLAY , "PLAY" , nullptr ),
229  K( VK_ZOOM , "ZOOM" , nullptr ),
230  K( VK_NONAME , "NONAME" , nullptr ),
231  K( VK_PA1 , "PA1" , nullptr ),
232  K( VK_OEM_CLEAR , "OEM_CLEAR" , nullptr ),*/
233 
234  { KEY_Any, "Any" , nullptr},
235  { KEY_Default, "None", nullptr},
236  { KEY_Undefined, nullptr, nullptr}
237 };
238 #undef K
#define K(k, s, a)
const C4KeyCode KEY_Default
const C4KeyCodeMapEntry KeyCodeMap[]
const C4KeyCode KEY_Undefined
const C4KeyCode KEY_Any