There is no much gain from having an internal kbd_desc_keysym_to_string()
function if we cannot get access to the kbd_desc object. Therefore, add a
forward helper to uterm_input() which forwards the call to its internal
kbd_desc object. This allows outside access to the keysym_to_string()
function.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
void uterm_input_wake_up(struct uterm_input *input);
bool uterm_input_is_awake(struct uterm_input *input);
+void uterm_input_keysym_to_string(struct uterm_input *input,
+ uint32_t keysym, char *str, size_t size);
+
/*
* System Monitor
* This watches the system for new seats, graphics devices or other devices that
return input->awake;
}
+
+void uterm_input_keysym_to_string(struct uterm_input *input,
+ uint32_t keysym, char *str, size_t size)
+{
+ if (!str || !size)
+ return;
+ if (!input) {
+ *str = 0;
+ return;
+ }
+
+ kbd_desc_keysym_to_string(input->desc, keysym, str, size);
+}