summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorMyrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>2025-07-02 21:17:57 +0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 16:28:33 +0200
commitc0942ce38843d3c1fe67d390709a39fdb819079b (patch)
tree30a02aa4613a70e4810cd24a7cef28464d3f094f /drivers/tty
parent5e17429679a8545afe438ce7a82a13a54e8ceabb (diff)
downloadlinux-c0942ce38843d3c1fe67d390709a39fdb819079b.tar.gz
linux-c0942ce38843d3c1fe67d390709a39fdb819079b.tar.bz2
linux-c0942ce38843d3c1fe67d390709a39fdb819079b.zip
vt: keyboard: Don't process Unicode characters in K_OFF mode
commit b1cc2092ea7a52e2c435aee6d2b1bcb773202663 upstream. 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>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/vt/keyboard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 358f216c6cd6..18b3c197c134 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1496,7 +1496,7 @@ static void kbd_keycode(unsigned int keycode, int down, bool hw_raw)
rc = atomic_notifier_call_chain(&keyboard_notifier_list,
KBD_UNICODE, &param);
if (rc != NOTIFY_STOP)
- if (down && !raw_mode)
+ if (down && !(raw_mode || kbd->kbdmode == VC_OFF))
k_unicode(vc, keysym, !down);
return;
}