input: Add mapping table for converting keycode string into value 04/309604/1 accepted/tizen/8.0/unified/20240424.172444
authorYunhee Seo <yuni.seo@samsung.com>
Fri, 12 Apr 2024 10:37:17 +0000 (19:37 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Fri, 12 Apr 2024 10:40:47 +0000 (19:40 +0900)
commitdd91a76ac5c2fb174d5216c6fae946f1a1c3169d
tree06688404f2be67af7bd92d77b24385e272d45366
parentf469f3cf489eb11c616e2b5b122c62f096d784ea
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 conf file.
Also, please refer key_infos array or definitions in linux/input.h

Change-Id: I845c38046cfbd90596633e74e5e82e74340e1849
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
packaging/input.conf
src/deviced-input/deviced-input.c