Implement Alt + key mapping to Esc followed by key in kernel tty

This commit is contained in:
Juhani Krekelä 2021-05-04 00:59:17 +03:00 committed by Jonas 'Sortie' Termansen
parent 73e42780f4
commit 7f9a62d916
1 changed files with 2 additions and 0 deletions

View File

@ -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'}') )