1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$NetBSD: patch-aa,v 1.2 2004/07/26 18:00:17 dillo Exp $
Make default keys match documentation.
Also, add settings for joystick.
--- src/drivers/pc/input.c.orig 2004-05-17 01:48:26.000000000 +0200
+++ src/drivers/pc/input.c
@@ -278,6 +278,10 @@ static void KeyboardCommands(void)
#define MK(x) {{BUTTC_KEYBOARD},{0},{MKK(x)},1}
#define MK2(x1,x2) {{BUTTC_KEYBOARD},{0},{MKK(x1),MKK(x2)},2}
+#define MKJA(x, a, d) {{BUTTC_KEYBOARD, BUTTC_JOYSTICK}, \
+ {0, 0},{MKK(x),0x8000|((d)<<14)|(a)},2}
+#define MKJB(x, a) {{BUTTC_KEYBOARD, BUTTC_JOYSTICK}, \
+ {0, 0},{MKK(x),(a)},2}
#define MKZ() {{0},{0},{0},0}
@@ -286,8 +290,13 @@ static void KeyboardCommands(void)
ButtConfig GamePadConfig[4][10]={
/* Gamepad 1 */
{
- MK(KP3), MK(KP2), MK(TAB), MK(ENTER), MK(W),MK(Z),
- MK(A), MK(S), MKZ(), MKZ()
+ MKJB(LEFTALT, 0), MKJB(LEFTCONTROL, 1), MKJB(TAB, 5), MKJB(ENTER, 7),
+ MKJA(CURSORUP, 1, 1), MKJA(CURSORDOWN, 1, 0),
+ MKJA(CURSORLEFT, 0, 1), MKJA(CURSORRIGHT, 0, 0), MKZ(), MKZ()
+#if 0
+ MK(LEFTALT), MK(LEFTCONTROL), MK(TAB), MK(ENTER), MK(CURSORUP),
+ MK(CURSORDOWN), MK(CURSORLEFT), MK(CURSORRIGHT), MKZ(), MKZ()
+#endif
},
/* Gamepad 2 */
|