|
1 /* |
|
2 * Hedgewars, a free turn based strategy game |
|
3 * Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
|
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; version 2 of the License |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU General Public License |
|
15 * along with this program; if not, write to the Free Software |
|
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
|
17 */ |
|
18 |
|
19 #include "sdlkeys.h" |
|
20 |
|
21 #include <QtGlobal> |
|
22 |
|
23 char sdlkeys[1024][2][128] = |
|
24 { |
|
25 {"mousel", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Left button")}, |
|
26 {"mousem", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Middle button")}, |
|
27 {"mouser", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Right button")}, |
|
28 {"wheelup", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel up")}, |
|
29 {"wheeldown", QT_TRANSLATE_NOOP("binds (keys)", "Mouse: Wheel down")}, |
|
30 {"backspace", QT_TRANSLATE_NOOP("binds (keys)", "Backspace")}, |
|
31 {"tab", QT_TRANSLATE_NOOP("binds (keys)", "Tab")}, |
|
32 {"clear", QT_TRANSLATE_NOOP("binds (keys)", "Clear")}, |
|
33 {"return", QT_TRANSLATE_NOOP("binds (keys)", "Return")}, |
|
34 {"pause", QT_TRANSLATE_NOOP("binds (keys)", "Pause")}, |
|
35 {"escape", QT_TRANSLATE_NOOP("binds (keys)", "Escape")}, |
|
36 {"space", QT_TRANSLATE_NOOP("binds (keys)", "Space")}, |
|
37 {"!", "!"}, |
|
38 {"\"", "\""}, |
|
39 {"#", "#"}, |
|
40 {"$", "$"}, |
|
41 {"&", "&"}, |
|
42 {"'", "'"}, |
|
43 {"(", "("}, |
|
44 {")", ")"}, |
|
45 {"*", "*"}, |
|
46 {"+", "+"}, |
|
47 {",", ","}, |
|
48 {"-", "-"}, |
|
49 {".", "."}, |
|
50 {"/", "/"}, |
|
51 {"0", "0"}, |
|
52 {"1", "1"}, |
|
53 {"2", "2"}, |
|
54 {"3", "3"}, |
|
55 {"4", "4"}, |
|
56 {"5", "5"}, |
|
57 {"6", "6"}, |
|
58 {"7", "7"}, |
|
59 {"8", "8"}, |
|
60 {"9", "9"}, |
|
61 {":", ":"}, |
|
62 {";", ";"}, |
|
63 {"<", "<"}, |
|
64 {"=", "="}, |
|
65 {">", ">"}, |
|
66 {"?", "?"}, |
|
67 {"@", "@"}, |
|
68 {"[", "["}, |
|
69 {"\\", "\\"}, |
|
70 {"]", "]"}, |
|
71 {"^", "^"}, |
|
72 {"_", "_"}, |
|
73 {"`", "`"}, |
|
74 {"a", "A"}, |
|
75 {"b", "B"}, |
|
76 {"c", "C"}, |
|
77 {"d", "D"}, |
|
78 {"e", "E"}, |
|
79 {"f", "F"}, |
|
80 {"g", "G"}, |
|
81 {"h", "H"}, |
|
82 {"i", "I"}, |
|
83 {"j", "J"}, |
|
84 {"k", "K"}, |
|
85 {"l", "L"}, |
|
86 {"m", "M"}, |
|
87 {"n", "N"}, |
|
88 {"o", "O"}, |
|
89 {"p", "P"}, |
|
90 {"q", "Q"}, |
|
91 {"r", "R"}, |
|
92 {"s", "S"}, |
|
93 {"t", "T"}, |
|
94 {"u", "U"}, |
|
95 {"v", "V"}, |
|
96 {"w", "W"}, |
|
97 {"x", "X"}, |
|
98 {"y", "Y"}, |
|
99 {"z", "Z"}, |
|
100 {"delete", QT_TRANSLATE_NOOP("binds (keys)", "Delete")}, |
|
101 {"keypad_0", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 0")}, |
|
102 {"keypad_1", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 1")}, |
|
103 {"keypad_2", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 2")}, |
|
104 {"keypad_3", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 3")}, |
|
105 {"keypad_4", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 4")}, |
|
106 {"keypad_5", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 5")}, |
|
107 {"keypad_6", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 6")}, |
|
108 {"keypad_7", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 7")}, |
|
109 {"keypad_8", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 8")}, |
|
110 {"keypad_9", QT_TRANSLATE_NOOP("binds (keys)", "Numpad 9")}, |
|
111 {"keypad_.", QT_TRANSLATE_NOOP("binds (keys)", "Numpad .")}, |
|
112 {"keypad_/", QT_TRANSLATE_NOOP("binds (keys)", "Numpad /")}, |
|
113 {"keypad_*", QT_TRANSLATE_NOOP("binds (keys)", "Numpad *")}, |
|
114 {"keypad_-", QT_TRANSLATE_NOOP("binds (keys)", "Numpad -")}, |
|
115 {"keypad_+", QT_TRANSLATE_NOOP("binds (keys)", "Numpad +")}, |
|
116 {"enter", QT_TRANSLATE_NOOP("binds (keys)", "Enter")}, |
|
117 {"equals", QT_TRANSLATE_NOOP("binds (keys)", "Equals")}, |
|
118 {"up", QT_TRANSLATE_NOOP("binds (keys)", "Up")}, |
|
119 {"down", QT_TRANSLATE_NOOP("binds (keys)", "Down")}, |
|
120 {"right", QT_TRANSLATE_NOOP("binds (keys)", "Right")}, |
|
121 {"left", QT_TRANSLATE_NOOP("binds (keys)", "Left")}, |
|
122 {"insert", QT_TRANSLATE_NOOP("binds (keys)", "Insert")}, |
|
123 {"home", QT_TRANSLATE_NOOP("binds (keys)", "Home")}, |
|
124 {"end", QT_TRANSLATE_NOOP("binds (keys)", "End")}, |
|
125 {"page_up", QT_TRANSLATE_NOOP("binds (keys)", "Page up")}, |
|
126 {"page_down", QT_TRANSLATE_NOOP("binds (keys)", "Page down")}, |
|
127 {"f1", "F1"}, |
|
128 {"f2", "F2"}, |
|
129 {"f3", "F3"}, |
|
130 {"f4", "F4"}, |
|
131 {"f5", "F5"}, |
|
132 {"f6", "F6"}, |
|
133 {"f7", "F7"}, |
|
134 {"f8", "F8"}, |
|
135 {"f9", "F9"}, |
|
136 {"f10", "F10"}, |
|
137 {"f11", "F11"}, |
|
138 {"f12", "F12"}, |
|
139 {"f13", "F13"}, |
|
140 {"f14", "F14"}, |
|
141 {"f15", "F15"}, |
|
142 {"numlock", QT_TRANSLATE_NOOP("binds (keys)", "Num lock")}, |
|
143 {"caps_lock", QT_TRANSLATE_NOOP("binds (keys)", "Caps lock")}, |
|
144 {"scroll_lock", QT_TRANSLATE_NOOP("binds (keys)", "Scroll lock")}, |
|
145 {"right_shift", QT_TRANSLATE_NOOP("binds (keys)", "Right shift")}, |
|
146 {"left_shift", QT_TRANSLATE_NOOP("binds (keys)", "Left shift")}, |
|
147 {"right_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Right ctrl")}, |
|
148 {"left_ctrl", QT_TRANSLATE_NOOP("binds (keys)", "Left ctrl")}, |
|
149 {"right_alt", QT_TRANSLATE_NOOP("binds (keys)", "Right alt")}, |
|
150 {"left_alt", QT_TRANSLATE_NOOP("binds (keys)", "Left alt")}, |
|
151 {"right_meta", QT_TRANSLATE_NOOP("binds (keys)", "Right meta")}, |
|
152 {"left_meta", QT_TRANSLATE_NOOP("binds (keys)", "Left meta")} |
|
153 }; |
|
154 |
|
155 // button name definitions for Microsoft's XBox360 controller |
|
156 // don't modify button order! |
|
157 char xb360buttons[10][128] = |
|
158 { |
|
159 QT_TRANSLATE_NOOP("binds (keys)", "A button"), |
|
160 QT_TRANSLATE_NOOP("binds (keys)", "B button"), |
|
161 QT_TRANSLATE_NOOP("binds (keys)", "X button"), |
|
162 QT_TRANSLATE_NOOP("binds (keys)", "Y button"), |
|
163 QT_TRANSLATE_NOOP("binds (keys)", "LB button"), |
|
164 QT_TRANSLATE_NOOP("binds (keys)", "RB button"), |
|
165 QT_TRANSLATE_NOOP("binds (keys)", "Back button"), |
|
166 QT_TRANSLATE_NOOP("binds (keys)", "Start button"), |
|
167 QT_TRANSLATE_NOOP("binds (keys)", "Left stick"), |
|
168 QT_TRANSLATE_NOOP("binds (keys)", "Right stick") |
|
169 }; |
|
170 |
|
171 // axis name definitions for Microsoft's XBox360 controller |
|
172 // don't modify axis order! |
|
173 char xbox360axes[][128] = |
|
174 { |
|
175 QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Right)"), |
|
176 QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Left)"), |
|
177 QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Down)"), |
|
178 QT_TRANSLATE_NOOP("binds (keys)", "Left stick (Up)"), |
|
179 QT_TRANSLATE_NOOP("binds (keys)", "Left trigger"), |
|
180 QT_TRANSLATE_NOOP("binds (keys)", "Right trigger"), |
|
181 QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Down)"), |
|
182 QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Up)"), |
|
183 QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Right)"), |
|
184 QT_TRANSLATE_NOOP("binds (keys)", "Right stick (Left)"), |
|
185 }; |
|
186 char xb360dpad[128] = QT_TRANSLATE_NOOP("binds (keys)", "D-pad"); |
|
187 |
|
188 // Generic controller binding names |
|
189 //: Game controller axis direction. %1 = axis number, %2 = direction |
|
190 char controlleraxis[128] = QT_TRANSLATE_NOOP("binds (keys)", "Axis %1 %2"); |
|
191 //: Game controller button. %1 = button number |
|
192 char controllerbutton[128] = QT_TRANSLATE_NOOP("binds (keys)", "Button %1"); |
|
193 //: Game controller D-pad button. %1 = D-pad number, %2 = direction |
|
194 char controllerhat[128] = QT_TRANSLATE_NOOP("binds (keys)", "D-pad %1 %2"); |
|
195 char controllerup[128] = QT_TRANSLATE_NOOP("binds (keys)", "Up"); |
|
196 char controllerdown[128] = QT_TRANSLATE_NOOP("binds (keys)", "Down"); |
|
197 char controllerleft[128] = QT_TRANSLATE_NOOP("binds (keys)", "Left"); |
|
198 char controllerright[128] = QT_TRANSLATE_NOOP("binds (keys)", "Right"); |
|
199 |