Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tty: vt: keyboard: Allow Unicode compose base char

Pass Unicode character to k_unicode handler function to honor possible
accent_table definition.

With introduction of KDSKBDIACRUC ioctl, it has been possible to set
compose characters (diacr, base and result) to any Unicode character
(below 0xf000 code point) as defined in struct kbdiacruc.

But it does not work with characters beyond Latin-1 as base, because
they are printed early and not passed to any of the handler functions,
thus breaking compose and dead keys.

It affects keyboard layouts defining such characters on level 1 and
relying on dead keys to access level 3 (e.g., lv-modern with some
modifications for extra characters on level 3 for ē, ā and ī keys).

Signed-off-by: Reinis Danne <rei4dan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Reinis Danne and committed by
Greg Kroah-Hartman
89bb1e1e 0d3cb6f6

+1 -1
+1 -1
drivers/tty/vt/keyboard.c
··· 1450 1450 KBD_UNICODE, &param); 1451 1451 if (rc != NOTIFY_STOP) 1452 1452 if (down && !raw_mode) 1453 - to_utf8(vc, keysym); 1453 + k_unicode(vc, keysym, !down); 1454 1454 return; 1455 1455 } 1456 1456