mirror of
https://github.com/moparisthebest/uinput-mapper
synced 2024-11-15 21:25:01 -05:00
Cleanups + fixes
This commit is contained in:
parent
efb97679df
commit
8e73743889
2
Makefile
2
Makefile
@ -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
|
||||||
|
24
custom_map.h
24
custom_map.h
@ -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
|
||||||
|
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user