Cleanups + fixes

This commit is contained in:
Merlijn Wajer 2012-12-04 20:34:38 +01:00
parent efb97679df
commit 8e73743889
3 changed files with 13 additions and 14 deletions

View File

@ -7,7 +7,7 @@ CFLAGS+=-D_BSD_SOURCE
default: map default: map
keys: keys:
bash genkeys.sh echo '#include <linux/input.h>' | gcc -E -dM - | grep '#define KEY_' | cut -f2 -d" " | sed 's/KEY_.*/DEF_KEY(&)/' > def_keys.h
map: map.c keys map: map.c keys
$(CC) map.c $(CFLAGS) -o map $(CC) map.c $(CFLAGS) -o map

View File

@ -23,32 +23,32 @@
/* HAT */ /* HAT */
KEYMAP(KEY_UP, ABS_HAT0Y, EV_ABS, 0, -) KEYMAP(KEY_UP, ABS_HAT0Y, EV_ABS, 0, -)
KEYMAP(KEY_DOWN, ABS_HAT0Y, EV_ABS, 0, ) KEYMAP(KEY_DOWN, ABS_HAT0Y, EV_ABS, 0, +)
KEYMAP(KEY_LEFT, ABS_HAT0X, EV_ABS, 0, -) KEYMAP(KEY_LEFT, ABS_HAT0X, EV_ABS, 0, -)
KEYMAP(KEY_RIGHT, ABS_HAT0X, EV_ABS, 0, ) KEYMAP(KEY_RIGHT, ABS_HAT0X, EV_ABS, 0, +)
/* Red buttons */ /* Red buttons */
KEYMAP(KEY_LEFTCTRL, BTN_0, EV_KEY, 0, ) KEYMAP(KEY_LEFTCTRL, BTN_0, EV_KEY, 0, +)
KEYMAP(KEY_LEFTALT, BTN_1, EV_KEY, 0, ) KEYMAP(KEY_LEFTALT, BTN_1, EV_KEY, 0, +)
KEYMAP(KEY_SPACE, BTN_2, EV_KEY, 0, ) KEYMAP(KEY_SPACE, BTN_2, EV_KEY, 0, +)
/* Yellow button */ /* Yellow button */
KEYMAP(KEY_1, BTN_3, EV_KEY, 0, ) KEYMAP(KEY_1, BTN_3, EV_KEY, 0, +)
/* Second joystick */ /* Second joystick */
/* HAT*/ /* HAT*/
KEYMAP(KEY_R, ABS_HAT0Y, EV_ABS, 1, -) KEYMAP(KEY_R, ABS_HAT0Y, EV_ABS, 1, -)
KEYMAP(KEY_F, ABS_HAT0Y, EV_ABS, 1, ) KEYMAP(KEY_F, ABS_HAT0Y, EV_ABS, 1, +)
KEYMAP(KEY_D, ABS_HAT0X, EV_ABS, 1, -) KEYMAP(KEY_D, ABS_HAT0X, EV_ABS, 1, -)
KEYMAP(KEY_G, ABS_HAT0X, EV_ABS, 1, ) KEYMAP(KEY_G, ABS_HAT0X, EV_ABS, 1, +)
/* Red buttons */ /* Red buttons */
KEYMAP(KEY_A, BTN_0, EV_KEY, 1, ) KEYMAP(KEY_A, BTN_0, EV_KEY, 1, +)
KEYMAP(KEY_S, BTN_1, EV_KEY, 1, ) KEYMAP(KEY_S, BTN_1, EV_KEY, 1, +)
KEYMAP(KEY_Q, BTN_2, EV_KEY, 1, ) KEYMAP(KEY_Q, BTN_2, EV_KEY, 1, +)
/* Yellow button */ /* Yellow button */
KEYMAP(KEY_2, BTN_3, EV_KEY, 1,) KEYMAP(KEY_2, BTN_3, EV_KEY, 1, +)
#endif #endif

View File

@ -1 +0,0 @@
echo '#include <linux/input.h>' | gcc -E -dM - | grep '#define KEY_' | cut -f2 -d" " | sed 's/KEY_.*/DEF_KEY(&)/' > def_keys.h