Modernize key.h

This commit is contained in:
Merlijn Wajer 2013-02-09 14:02:52 +01:00
parent 33a3cd1dc2
commit 16a3e67d3b

View File

@ -6,11 +6,24 @@
/* Set up amount of joysticks here */ /* Set up amount of joysticks here */
#define JOYCOUNT 1 #define JOYCOUNT 1
/* Set up event to read from */ /* Set up amount of input devices here */
#define INPUT_PATH "/dev/input/event9" #define INPUT_DEVICE_COUNT 1
#endif #endif
/* -------------------------------------------------------------------------- */
/* ------------------- FIRST AND A HALF SECTION ----------------------------- */
/* -------------------------------------------------------------------------- */
#ifdef H_CONFIGURE_EVENTS
#ifndef H_CONFIGURE_EVENTS_SEEN
#define H_CONFIGURE_EVENTS_SEEN
ADD_INPUT_PATH("/dev/input/event9", 0)
#endif
#endif
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* ----------------------------- SECOND SECTION ----------------------------- */ /* ----------------------------- SECOND SECTION ----------------------------- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -27,9 +40,9 @@
* If a key is not enabled here, it will never be passed. * If a key is not enabled here, it will never be passed.
*/ */
/* Keyboard */ /* Mouse */
JOYSTICK_SET_OPT(EV_KEY, UI_SET_EVBIT, 0) JOYSTICK_SET_OPT(EV_KEY, UI_SET_EVBIT, 0)
JOYSTICK_ADD_KEY(KEY_A, UI_SET_KEYBIT, 0) JOYSTICK_ADD_KEY(KEY_RIGHTMETA, UI_SET_KEYBIT, 0)
#endif #endif
#endif #endif
@ -41,7 +54,7 @@ JOYSTICK_ADD_KEY(KEY_A, UI_SET_KEYBIT, 0)
#ifndef H_JOYMAP_SEEN #ifndef H_JOYMAP_SEEN
#define H_JOYMAP_SEEN #define H_JOYMAP_SEEN
KEYMAP(EV_KEY, BTN_LEFT, KEY_A, EV_KEY, 0, +) KEYMAP(EV_KEY, BTN_MIDDLE, KEY_RIGHTMETA, EV_KEY, 0, -1, +)
#endif #endif
#endif #endif