Line 0
Link Here
|
|
|
1 |
--- input/input_keymaps.c.orig 2019-05-07 23:56:49 UTC |
2 |
+++ input/input_keymaps.c |
3 |
@@ -50,7 +50,9 @@ |
4 |
#endif |
5 |
|
6 |
#ifdef HAVE_X11 |
7 |
-#include "input/include/xfree86_keycodes.h" |
8 |
+#include <X11/Xlib.h> |
9 |
+#include <X11/Xutil.h> |
10 |
+#include <X11/keysym.h> |
11 |
#endif |
12 |
|
13 |
#ifdef HAVE_DINPUT |
14 |
@@ -951,123 +953,156 @@ const struct rarch_key_map rarch_key_map_wiiu[] = { |
15 |
|
16 |
#ifdef HAVE_X11 |
17 |
|
18 |
-const struct rarch_key_map rarch_key_map_x11[] = { |
19 |
+#ifndef XF68XK_Calculator |
20 |
+#define XF86XK_Calculator 0x1008FF1D |
21 |
+#endif |
22 |
|
23 |
- { XFVK_ESC, RETROK_ESCAPE }, |
24 |
- { XFVK_FK01, RETROK_F1 }, |
25 |
- { XFVK_FK02, RETROK_F2 }, |
26 |
- { XFVK_FK03, RETROK_F3 }, |
27 |
- { XFVK_FK04, RETROK_F4 }, |
28 |
- { XFVK_FK05, RETROK_F5 }, |
29 |
- { XFVK_FK06, RETROK_F6 }, |
30 |
- { XFVK_FK07, RETROK_F7 }, |
31 |
- { XFVK_FK08, RETROK_F8 }, |
32 |
- { XFVK_FK09, RETROK_F9 }, |
33 |
- { XFVK_FK10, RETROK_F10 }, |
34 |
- { XFVK_FK11, RETROK_F11 }, |
35 |
- { XFVK_FK12, RETROK_F12 }, |
36 |
- |
37 |
- { XFVK_TLDE, RETROK_BACKQUOTE }, |
38 |
- { XFVK_AE01, RETROK_1 }, |
39 |
- { XFVK_AE02, RETROK_2 }, |
40 |
- { XFVK_AE03, RETROK_3 }, |
41 |
- { XFVK_AE04, RETROK_4 }, |
42 |
- { XFVK_AE05, RETROK_5 }, |
43 |
- { XFVK_AE06, RETROK_6 }, |
44 |
- { XFVK_AE07, RETROK_7 }, |
45 |
- { XFVK_AE08, RETROK_8 }, |
46 |
- { XFVK_AE09, RETROK_9 }, |
47 |
- { XFVK_AE10, RETROK_0 }, |
48 |
- { XFVK_AE11, RETROK_MINUS }, |
49 |
- { XFVK_AE12, RETROK_EQUALS }, |
50 |
- { XFVK_BKSP, RETROK_BACKSPACE }, |
51 |
- |
52 |
- { XFVK_TAB, RETROK_TAB }, |
53 |
- { XFVK_AD01, RETROK_q }, |
54 |
- { XFVK_AD02, RETROK_w }, |
55 |
- { XFVK_AD03, RETROK_e }, |
56 |
- { XFVK_AD04, RETROK_r }, |
57 |
- { XFVK_AD05, RETROK_t }, |
58 |
- { XFVK_AD06, RETROK_y }, |
59 |
- { XFVK_AD07, RETROK_u }, |
60 |
- { XFVK_AD08, RETROK_i }, |
61 |
- { XFVK_AD09, RETROK_o }, |
62 |
- { XFVK_AD10, RETROK_p }, |
63 |
- { XFVK_AD11, RETROK_LEFTBRACKET }, |
64 |
- { XFVK_AD12, RETROK_RIGHTBRACKET }, |
65 |
- { XFVK_RTRN, RETROK_RETURN }, |
66 |
- |
67 |
- { XFVK_CAPS, RETROK_CAPSLOCK }, |
68 |
- { XFVK_AC01, RETROK_a }, |
69 |
- { XFVK_AC02, RETROK_s }, |
70 |
- { XFVK_AC03, RETROK_d }, |
71 |
- { XFVK_AC04, RETROK_f }, |
72 |
- { XFVK_AC05, RETROK_g }, |
73 |
- { XFVK_AC06, RETROK_h }, |
74 |
- { XFVK_AC07, RETROK_j }, |
75 |
- { XFVK_AC08, RETROK_k }, |
76 |
- { XFVK_AC09, RETROK_l }, |
77 |
- { XFVK_AC10, RETROK_SEMICOLON }, |
78 |
- { XFVK_AC11, RETROK_QUOTE }, |
79 |
- { XFVK_AC12, RETROK_BACKSLASH }, |
80 |
- |
81 |
- { XFVK_LFSH, RETROK_LSHIFT }, |
82 |
- { XFVK_AB01, RETROK_z }, |
83 |
- { XFVK_AB02, RETROK_x }, |
84 |
- { XFVK_AB03, RETROK_c }, |
85 |
- { XFVK_AB04, RETROK_v }, |
86 |
- { XFVK_AB05, RETROK_b }, |
87 |
- { XFVK_AB06, RETROK_n }, |
88 |
- { XFVK_AB07, RETROK_m }, |
89 |
- { XFVK_AB08, RETROK_COMMA }, |
90 |
- { XFVK_AB09, RETROK_PERIOD }, |
91 |
- { XFVK_AB10, RETROK_SLASH }, |
92 |
- { XFVK_RTSH, RETROK_RSHIFT }, |
93 |
- |
94 |
- { XFVK_LALT, RETROK_LALT }, |
95 |
- { XFVK_LCTL, RETROK_LCTRL }, |
96 |
- { XFVK_SPCE, RETROK_SPACE }, |
97 |
- { XFVK_RCTL, RETROK_RCTRL }, |
98 |
- { XFVK_RALT, RETROK_RALT }, |
99 |
- |
100 |
- { XFVK_LSGT, RETROK_OEM_102 }, |
101 |
- { XFVK_MENU, RETROK_MENU }, |
102 |
- { XFVK_LWIN, RETROK_LSUPER }, |
103 |
- { XFVK_RWIN, RETROK_RSUPER }, |
104 |
- { XFVK_CALC, RETROK_HELP }, |
105 |
- |
106 |
- { XFVK_PRSC, RETROK_PRINT }, |
107 |
- { XFVK_SCLK, RETROK_SCROLLOCK }, |
108 |
- { XFVK_PAUS, RETROK_PAUSE }, |
109 |
- { XFVK_INS, RETROK_INSERT }, |
110 |
- { XFVK_HOME, RETROK_HOME }, |
111 |
- { XFVK_PGUP, RETROK_PAGEUP }, |
112 |
- { XFVK_DELE, RETROK_DELETE }, |
113 |
- { XFVK_END, RETROK_END }, |
114 |
- { XFVK_PGDN, RETROK_PAGEDOWN }, |
115 |
- { XFVK_UP, RETROK_UP }, |
116 |
- { XFVK_LEFT, RETROK_LEFT }, |
117 |
- { XFVK_DOWN, RETROK_DOWN }, |
118 |
- { XFVK_RGHT, RETROK_RIGHT }, |
119 |
- |
120 |
- { XFVK_NMLK, RETROK_NUMLOCK }, |
121 |
- { XFVK_KPDV, RETROK_KP_DIVIDE }, |
122 |
- { XFVK_KPMU, RETROK_KP_MULTIPLY }, |
123 |
- { XFVK_KPSU, RETROK_KP_MINUS }, |
124 |
- { XFVK_KP7, RETROK_KP7 }, |
125 |
- { XFVK_KP8, RETROK_KP8 }, |
126 |
- { XFVK_KP9, RETROK_KP9 }, |
127 |
- { XFVK_KPAD, RETROK_KP_PLUS }, |
128 |
- { XFVK_KP4, RETROK_KP4 }, |
129 |
- { XFVK_KP5, RETROK_KP5 }, |
130 |
- { XFVK_KP6, RETROK_KP6 }, |
131 |
- { XFVK_KP1, RETROK_KP1 }, |
132 |
- { XFVK_KP2, RETROK_KP2 }, |
133 |
- { XFVK_KP3, RETROK_KP3 }, |
134 |
- { XFVK_KPEN, RETROK_KP_ENTER }, |
135 |
- { XFVK_KP0, RETROK_KP0 }, |
136 |
- { XFVK_KPDL, RETROK_KP_PERIOD }, |
137 |
- { XFVK_KPEQ, RETROK_KP_EQUALS }, |
138 |
+const struct rarch_key_map rarch_key_map_x11[] = { |
139 |
+ { XK_BackSpace, RETROK_BACKSPACE }, |
140 |
+ { XK_Tab, RETROK_TAB }, |
141 |
+ { XK_Clear, RETROK_CLEAR }, |
142 |
+ { XK_Return, RETROK_RETURN }, |
143 |
+ { XK_Pause, RETROK_PAUSE }, |
144 |
+ { XK_Escape, RETROK_ESCAPE }, |
145 |
+ { XK_space, RETROK_SPACE }, |
146 |
+ { XK_exclam, RETROK_EXCLAIM }, |
147 |
+ { XK_quotedbl, RETROK_QUOTEDBL }, |
148 |
+ { XK_numbersign, RETROK_HASH }, |
149 |
+ { XK_dollar, RETROK_DOLLAR }, |
150 |
+ { XK_ampersand, RETROK_AMPERSAND }, |
151 |
+ { XK_apostrophe, RETROK_QUOTE }, |
152 |
+ { XK_parenleft, RETROK_LEFTPAREN }, |
153 |
+ { XK_parenright, RETROK_RIGHTPAREN }, |
154 |
+ { XK_asterisk, RETROK_ASTERISK }, |
155 |
+ { XK_plus, RETROK_PLUS }, |
156 |
+ { XK_comma, RETROK_COMMA }, |
157 |
+ { XK_minus, RETROK_MINUS }, |
158 |
+ { XK_period, RETROK_PERIOD }, |
159 |
+ { XK_slash, RETROK_SLASH }, |
160 |
+ { XK_0, RETROK_0 }, |
161 |
+ { XK_1, RETROK_1 }, |
162 |
+ { XK_2, RETROK_2 }, |
163 |
+ { XK_3, RETROK_3 }, |
164 |
+ { XK_4, RETROK_4 }, |
165 |
+ { XK_5, RETROK_5 }, |
166 |
+ { XK_6, RETROK_6 }, |
167 |
+ { XK_7, RETROK_7 }, |
168 |
+ { XK_8, RETROK_8 }, |
169 |
+ { XK_9, RETROK_9 }, |
170 |
+ { XK_colon, RETROK_COLON }, |
171 |
+ { XK_semicolon, RETROK_SEMICOLON }, |
172 |
+ { XK_less, RETROK_LESS }, |
173 |
+ { XK_equal, RETROK_EQUALS }, |
174 |
+ { XK_greater, RETROK_GREATER }, |
175 |
+ { XK_question, RETROK_QUESTION }, |
176 |
+ { XK_at, RETROK_AT }, |
177 |
+ { XK_bracketleft, RETROK_LEFTBRACKET }, |
178 |
+ { XK_backslash, RETROK_BACKSLASH }, |
179 |
+ { XK_bracketright, RETROK_RIGHTBRACKET }, |
180 |
+ { XK_dead_circumflex, RETROK_CARET }, |
181 |
+ { XK_underscore, RETROK_UNDERSCORE }, |
182 |
+ { XK_grave, RETROK_BACKQUOTE }, |
183 |
+ { XK_a, RETROK_a }, |
184 |
+ { XK_b, RETROK_b }, |
185 |
+ { XK_c, RETROK_c }, |
186 |
+ { XK_d, RETROK_d }, |
187 |
+ { XK_e, RETROK_e }, |
188 |
+ { XK_f, RETROK_f }, |
189 |
+ { XK_g, RETROK_g }, |
190 |
+ { XK_h, RETROK_h }, |
191 |
+ { XK_i, RETROK_i }, |
192 |
+ { XK_j, RETROK_j }, |
193 |
+ { XK_k, RETROK_k }, |
194 |
+ { XK_l, RETROK_l }, |
195 |
+ { XK_m, RETROK_m }, |
196 |
+ { XK_n, RETROK_n }, |
197 |
+ { XK_o, RETROK_o }, |
198 |
+ { XK_p, RETROK_p }, |
199 |
+ { XK_q, RETROK_q }, |
200 |
+ { XK_r, RETROK_r }, |
201 |
+ { XK_s, RETROK_s }, |
202 |
+ { XK_t, RETROK_t }, |
203 |
+ { XK_u, RETROK_u }, |
204 |
+ { XK_v, RETROK_v }, |
205 |
+ { XK_w, RETROK_w }, |
206 |
+ { XK_x, RETROK_x }, |
207 |
+ { XK_y, RETROK_y }, |
208 |
+ { XK_z, RETROK_z }, |
209 |
+ { XK_Delete, RETROK_DELETE }, |
210 |
+ { XK_KP_0, RETROK_KP0 }, |
211 |
+ { XK_KP_1, RETROK_KP1 }, |
212 |
+ { XK_KP_2, RETROK_KP2 }, |
213 |
+ { XK_KP_3, RETROK_KP3 }, |
214 |
+ { XK_KP_4, RETROK_KP4 }, |
215 |
+ { XK_KP_5, RETROK_KP5 }, |
216 |
+ { XK_KP_6, RETROK_KP6 }, |
217 |
+ { XK_KP_7, RETROK_KP7 }, |
218 |
+ { XK_KP_8, RETROK_KP8 }, |
219 |
+ { XK_KP_9, RETROK_KP9 }, |
220 |
+ { XK_KP_Decimal, RETROK_KP_PERIOD }, |
221 |
+ { XK_KP_Divide, RETROK_KP_DIVIDE }, |
222 |
+ { XK_KP_Multiply, RETROK_KP_MULTIPLY }, |
223 |
+ { XK_KP_Subtract, RETROK_KP_MINUS }, |
224 |
+ { XK_KP_Add, RETROK_KP_PLUS }, |
225 |
+ { XK_KP_Enter, RETROK_KP_ENTER }, |
226 |
+ { XK_KP_Equal, RETROK_KP_EQUALS }, |
227 |
+ { XK_Up, RETROK_UP }, |
228 |
+ { XK_Down, RETROK_DOWN }, |
229 |
+ { XK_Right, RETROK_RIGHT }, |
230 |
+ { XK_Left, RETROK_LEFT }, |
231 |
+ { XK_Insert, RETROK_INSERT }, |
232 |
+ { XK_Home, RETROK_HOME }, |
233 |
+ { XK_End, RETROK_END }, |
234 |
+ { XK_Page_Up, RETROK_PAGEUP }, |
235 |
+ { XK_Page_Down, RETROK_PAGEDOWN }, |
236 |
+ { XK_F1, RETROK_F1 }, |
237 |
+ { XK_F2, RETROK_F2 }, |
238 |
+ { XK_F3, RETROK_F3 }, |
239 |
+ { XK_F4, RETROK_F4 }, |
240 |
+ { XK_F5, RETROK_F5 }, |
241 |
+ { XK_F6, RETROK_F6 }, |
242 |
+ { XK_F7, RETROK_F7 }, |
243 |
+ { XK_F8, RETROK_F8 }, |
244 |
+ { XK_F9, RETROK_F9 }, |
245 |
+ { XK_F10, RETROK_F10 }, |
246 |
+ { XK_F11, RETROK_F11 }, |
247 |
+ { XK_F12, RETROK_F12 }, |
248 |
+ { XK_F13, RETROK_F13 }, |
249 |
+ { XK_F14, RETROK_F14 }, |
250 |
+ { XK_F15, RETROK_F15 }, |
251 |
+ { XK_Num_Lock, RETROK_NUMLOCK }, |
252 |
+ { XK_Caps_Lock, RETROK_CAPSLOCK }, |
253 |
+ { XK_Scroll_Lock, RETROK_SCROLLOCK }, |
254 |
+ { XK_Shift_R, RETROK_RSHIFT }, |
255 |
+ { XK_Shift_L, RETROK_LSHIFT }, |
256 |
+ { XK_Control_R, RETROK_RCTRL }, |
257 |
+ { XK_Control_L, RETROK_LCTRL }, |
258 |
+ { XK_Alt_R, RETROK_RALT }, |
259 |
+ { XK_Alt_L, RETROK_LALT }, |
260 |
+ { XK_Meta_R, RETROK_RMETA }, |
261 |
+ { XK_Meta_L, RETROK_LMETA }, |
262 |
+ { XK_Super_L, RETROK_LSUPER }, |
263 |
+ { XK_Super_R, RETROK_RSUPER }, |
264 |
+ { XK_Mode_switch, RETROK_MODE }, |
265 |
+ { XK_Multi_key, RETROK_COMPOSE }, |
266 |
+ { XK_Help, RETROK_HELP }, |
267 |
+ { XK_Print, RETROK_PRINT }, |
268 |
+ { XK_Sys_Req, RETROK_SYSREQ }, |
269 |
+ { XK_Break, RETROK_BREAK }, |
270 |
+ { XK_Menu, RETROK_MENU }, |
271 |
+ /*{ ?, RETROK_POWER },*/ |
272 |
+ { XK_EuroSign, RETROK_EURO }, |
273 |
+ { XK_Undo, RETROK_UNDO }, |
274 |
+ /*{ ?, RETROK_OEM_102 },*/ |
275 |
+ /* FIXME(shizeeg): RetroArch can't handle these buttons atm. |
276 |
+ * Do we really need RETROK_KP_INSERT, RETROK_KP_END, |
277 |
+ * RETROK_KP_DOWN, RETROK_KP_PAGEDOWN ??? |
278 |
+ * |
279 |
+ { XK_KP_Insert, RETROK_KP0 }, |
280 |
+ { XK_KP_End, RETROK_KP1 }, |
281 |
+ { XK_KP_Down, RETROK_KP2 }, |
282 |
+ { XK_KP_Page_Down, RETROK_KP3 },*/ |
283 |
+ { XF86XK_Calculator, RETROK_HELP }, |
284 |
|
285 |
{ 0, RETROK_UNKNOWN }, |
286 |
}; |