plugin: iot-headless: input: Add mapping table for converting keycode string into... 81/309581/1
authorYunhee Seo <yuni.seo@samsung.com>
Thu, 11 Apr 2024 13:27:47 +0000 (22:27 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Fri, 12 Apr 2024 08:00:23 +0000 (17:00 +0900)
commit62ab1583c56aa292884b44535b3fd8212fcc5ed4
treeb0be2c087ba088daa542ffc8246c5da377231b75
parentb284fc6a1a440734c466d456b6273e16082743c3
plugin: iot-headless: input: Add mapping table for converting keycode string into value

Intuitively, to use the keycode of key/button definitions provided by
linux/input.h, deviced provides key_infos array.

key/button information is treated as a string and a number pair in key_infos array.
Those information will be handled in GHashTable.
While input.conf file is parsed, below structure is used
to pass GHashTable pointer.
struct input_parse_event_action {
struct input_event_unit *ieu;
GHashTable *hash_table_key_infos;
};

Rather than defining the keycode by itself, it is clearly unified into
the key/button definitions defined in linux/input.h
By doing this, the definition of keycode will not be changed or
their meanings mixed up.

Thus, existing below config definition will not be supported.
ex) keycode=power
    keycode=bluetooth

It should be defined like below.
ex) keycode=KEY_POWER
    keycode=KEY_BLUETOOTH

Detailed explanation is added to input-profile-iot-headless conf file.
Also, please refer key_infos array or definitions in linux/input.h

Change-Id: I41bfc91497f8d478e1238f4b363fd437b03c549c
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
conf/input-profile-iot-headless.conf
plugins/iot-headless/input/input-config.c
plugins/iot-headless/input/input-config.h