Implement unicode input method in uinput

From: Tobias Platen <hidden>
Date: 2022-04-08 09:01:17

Hello, 
I am new to linux-input and want to contribute to kernel development,
and want to propose an extension for uinput.

I have been using uinput with x11vnc on a computer that has a German
keyboard layout. When I press certain keys that are not on an English
keyboard nothing happens, as there is no mapping from the unicode input
(öäüß²³..) to the US keyboard layout. I have been asking myself, is
there a way to enter unicode characters, directly in uinput. Maybe
something like EV_KEY_UNICODE and using ev.code (a 32 bit value) to
pass the unicode value to the application without having to de-
translate to qwerty layout again. Another problem that happens when
detranslating from qwertz to qwerty are shifted keycodes being
different. So When I enter a '#' a '3' appers on the screen.

memset(&ev, 0, sizeof(ev));
gettimeofday(&ev.time, NULL);
ev.type = EV_KEY_UNICODE;
ev.code = unicode_codepos;
ev.value = 1;
write(d, &ev, sizeof(ev));

Tobias Platen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help