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

vt: keyboard: Don't process Unicode characters in K_OFF mode

We don't process Unicode characters if the virtual terminal is in raw
mode, so there's no reason why we shouldn't do the same for K_OFF
(especially since people would expect K_OFF to actually turn off all VT
key processing).

Fixes: 9fc3de9c8356 ("vt: Add virtual console keyboard mode OFF")
Signed-off-by: Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
Cc: stable <stable@kernel.org>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250702-vt-misc-unicode-fixes-v1-1-c27e143cc2eb@qtmlabs.xyz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Myrrh Periwinkle and committed by
Greg Kroah-Hartman
b1cc2092 86fa39dd

+1 -1
+1 -1
drivers/tty/vt/keyboard.c
··· 1487 1487 rc = atomic_notifier_call_chain(&keyboard_notifier_list, 1488 1488 KBD_UNICODE, &param); 1489 1489 if (rc != NOTIFY_STOP) 1490 - if (down && !raw_mode) 1490 + if (down && !(raw_mode || kbd->kbdmode == VC_OFF)) 1491 1491 k_unicode(vc, keysym, !down); 1492 1492 return; 1493 1493 }