From 7f9a62d91604ef81572b092341ab8b664c9b62d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Tue, 4 May 2021 00:59:17 +0300 Subject: [PATCH] Implement Alt + key mapping to Esc followed by key in kernel tty --- kernel/logterminal.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/logterminal.cpp b/kernel/logterminal.cpp index 0fd45866..92c82095 100644 --- a/kernel/logterminal.cpp +++ b/kernel/logterminal.cpp @@ -175,6 +175,8 @@ void LogTerminal::OnKeystroke(Keyboard* kb, void* /*user*/) bool control = modifiers & (MODIFIER_LCONTROL | MODIFIER_RCONTROL); if ( !(tio.c_cflag & ISORTIX_TERMMODE) && unicode == '\b' ) unicode = 127; + if ( modifiers & MODIFIER_ALT && !(tio.c_lflag & ISORTIX_KBKEY) ) + ProcessByte('\e'); if ( control && unicode == L' ' ) ProcessByte(0, unicode); else if ( control && (L'`' <= unicode && unicode <= L'}') )