test_input: always print keysym
Print keysym even if we have a UCS4 representation. This makes debugging keyboard issues much easier. Also increase buffer size to 32 as there are many symbols longer than 16 characters. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
ff7c065692
commit
51bfe9d107
@ -87,12 +87,11 @@ static void input_arrived(struct uterm_input *input,
|
|||||||
struct uterm_input_event *ev,
|
struct uterm_input_event *ev,
|
||||||
void *data)
|
void *data)
|
||||||
{
|
{
|
||||||
char s[16];
|
char s[32];
|
||||||
|
|
||||||
if (ev->unicode == UTERM_INPUT_INVALID) {
|
kbd_keysym_to_string(ev->keysym, s, sizeof(s));
|
||||||
kbd_keysym_to_string(ev->keysym, s, sizeof(s));
|
printf("sym %s ", s);
|
||||||
printf("sym %s ", s);
|
if (ev->unicode != UTERM_INPUT_INVALID) {
|
||||||
} else {
|
|
||||||
/*
|
/*
|
||||||
* Just a proof-of-concept hack. This works because glibc uses
|
* Just a proof-of-concept hack. This works because glibc uses
|
||||||
* UTF-32 (= UCS-4) as the internal wchar_t encoding.
|
* UTF-32 (= UCS-4) as the internal wchar_t encoding.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user