From b632b19c6f569153fa53a7bc2c648b9fe1d0ec0e Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Wed, 11 May 2022 17:52:25 +0900 Subject: [PATCH] input: support bluetooth key input for iot-headless Change-Id: I9a082c36bba8a737a3f2fe29d8d75dc444803400 Signed-off-by: Youngjae Cho --- conf/input-profile-iot-headless.conf | 2 +- plugins/iot-headless/input/input-config.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/input-profile-iot-headless.conf b/conf/input-profile-iot-headless.conf index 02bcd4a..5640a99 100644 --- a/conf/input-profile-iot-headless.conf +++ b/conf/input-profile-iot-headless.conf @@ -18,7 +18,7 @@ [EventAction] Name=BLINKKEY_EDGE Enum=1000 -Keycode=power +Keycode=bluetooth Duration=0,2000 TriggerType=edge Action=sleep,sleep diff --git a/plugins/iot-headless/input/input-config.c b/plugins/iot-headless/input/input-config.c index ce97c19..faeffb8 100644 --- a/plugins/iot-headless/input/input-config.c +++ b/plugins/iot-headless/input/input-config.c @@ -52,6 +52,8 @@ static void parse_keycode(struct input_event_unit *ieu, const char *keycode) { if (MATCH(keycode, "power")) ieu->keycode = KEY_POWER; + else if (MATCH(keycode, "bluetooth")) + ieu->keycode = KEY_BLUETOOTH; /* add keycode list here */ } -- 2.7.4