diff options
author | David Härdeman <david@hardeman.nu> | 2015-08-19 20:56:38 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2015-08-19 20:56:38 +0200 |
commit | 09c3b53ad8795e050b72277968fd50591bbb3a7f (patch) | |
tree | d83bcf26ec55ce585de3a86dd95bd17fe9861e4a /shared.c | |
parent | f3f7d5445e6f64a7c946f6e0144452952f0809e8 (diff) |
Add support for editing in-kernel keymap
Diffstat (limited to 'shared.c')
-rw-r--r-- | shared.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -45,6 +45,22 @@ get_linux_keycode_by_name(const char *name) return NULL; } +struct linux_input_keycode * +get_linux_keycode_by_value(uint32_t value) +{ + struct linux_input_keycode *lik = NULL; + unsigned i; + + for (i = 0; linux_input_keycodes[i].name; i++) { + if (linux_input_keycodes[i].value == value) { + lik = &linux_input_keycodes[i]; + break; + } + } + + return lik; +} + int strtol_strict(const char *str, int *result) { |