evdev: Define KEY_LIGHTS_TOGGLE macro if missing
authorJonas Ådahl <jadahl@opera.com>
Wed, 23 Apr 2014 07:54:49 +0000 (09:54 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 23 Apr 2014 08:00:15 +0000 (10:00 +0200)
When building on a system with an older kernel, some KEY_ macros might
be missing. To be able to build on such system, define them if they are
missing.

It is probably better to keep our own copy of input.h somewhere in our
tree, and include that one instead of the system one, but that can be
added later.

Signed-off-by: Jonas Ådahl <jadahl@opera.com>
src/evdev.c

index 918af8d6d0793e5ed498ffaf155016c91e847179..57dcca76c24972ae0f2272c60d91382c2f78ec5d 100644 (file)
 
 #define DEFAULT_AXIS_STEP_DISTANCE li_fixed_from_int(10)
 
+#ifndef KEY_LIGHTS_TOGGLE
+#define KEY_LIGHTS_TOGGLE 0x160
+#endif
+
 void
 evdev_device_led_update(struct evdev_device *device, enum libinput_led leds)
 {