input: replace keycode macro with one in linux header 66/265066/1
authorYoungjae Cho <y0.cho@samsung.com>
Fri, 8 Oct 2021 06:07:19 +0000 (15:07 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Fri, 8 Oct 2021 06:10:17 +0000 (15:10 +0900)
Change-Id: I04da6e45adad9a3360627cd241bba32e0fc04d94
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
plugins/iot-headless/input/input-handler.c

index 133aa7d..cf78e23 100644 (file)
  */
 
 #include <libinput.h>
+#include <linux/input.h>
 #include <glib.h>
 
 #include "core/devices.h"
 #include "shared/log.h"
 
-#define KEYCODE_BT_PAIRING      114
-#define KEYCODE_POWERKEY        116
-
 #define KEYVALUE_PRESS       1
 #define KEYVALUE_RELEASE     0
 
@@ -83,7 +81,7 @@ static void input_event_handler(struct libinput_event *e)
 
        _D("key input: code=%d, value=%d", keycode, keyvalue);
 
-       if (keycode == KEYCODE_POWERKEY) {
+       if (keycode == KEY_POWER) {
                if (keyvalue == KEYVALUE_PRESS)
                        start_longpress_timer();
                else if (keyvalue == KEYVALUE_RELEASE)