diff --git a/Makefile b/Makefile index a35c5a6..cb65fa8 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ CFLAGS+=-D_BSD_SOURCE default: map keys: - bash genkeys.sh + echo '#include ' | gcc -E -dM - | grep '#define KEY_' | cut -f2 -d" " | sed 's/KEY_.*/DEF_KEY(&)/' > def_keys.h map: map.c keys $(CC) map.c $(CFLAGS) -o map diff --git a/custom_map.h b/custom_map.h index 26168e7..e79b5dc 100644 --- a/custom_map.h +++ b/custom_map.h @@ -23,32 +23,32 @@ /* HAT */ 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_RIGHT, ABS_HAT0X, EV_ABS, 0, ) +KEYMAP(KEY_RIGHT, ABS_HAT0X, EV_ABS, 0, +) /* Red buttons */ -KEYMAP(KEY_LEFTCTRL, BTN_0, EV_KEY, 0, ) -KEYMAP(KEY_LEFTALT, BTN_1, EV_KEY, 0, ) -KEYMAP(KEY_SPACE, BTN_2, EV_KEY, 0, ) +KEYMAP(KEY_LEFTCTRL, BTN_0, EV_KEY, 0, +) +KEYMAP(KEY_LEFTALT, BTN_1, EV_KEY, 0, +) +KEYMAP(KEY_SPACE, BTN_2, EV_KEY, 0, +) /* Yellow button */ -KEYMAP(KEY_1, BTN_3, EV_KEY, 0, ) +KEYMAP(KEY_1, BTN_3, EV_KEY, 0, +) /* Second joystick */ /* HAT*/ 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_G, ABS_HAT0X, EV_ABS, 1, ) +KEYMAP(KEY_G, ABS_HAT0X, EV_ABS, 1, +) /* Red buttons */ -KEYMAP(KEY_A, BTN_0, EV_KEY, 1, ) -KEYMAP(KEY_S, BTN_1, EV_KEY, 1, ) -KEYMAP(KEY_Q, BTN_2, EV_KEY, 1, ) +KEYMAP(KEY_A, BTN_0, EV_KEY, 1, +) +KEYMAP(KEY_S, BTN_1, EV_KEY, 1, +) +KEYMAP(KEY_Q, BTN_2, EV_KEY, 1, +) /* Yellow button */ -KEYMAP(KEY_2, BTN_3, EV_KEY, 1,) +KEYMAP(KEY_2, BTN_3, EV_KEY, 1, +) #endif diff --git a/genkeys.sh b/genkeys.sh deleted file mode 100644 index 2c0e4a0..0000000 --- a/genkeys.sh +++ /dev/null @@ -1 +0,0 @@ -echo '#include ' | gcc -E -dM - | grep '#define KEY_' | cut -f2 -d" " | sed 's/KEY_.*/DEF_KEY(&)/' > def_keys.h