1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

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

View file

@ -175,6 +175,8 @@ void LogTerminal::OnKeystroke(Keyboard* kb, void* /*user*/)
bool control = modifiers & (MODIFIER_LCONTROL | MODIFIER_RCONTROL); bool control = modifiers & (MODIFIER_LCONTROL | MODIFIER_RCONTROL);
if ( !(tio.c_cflag & ISORTIX_TERMMODE) && unicode == '\b' ) if ( !(tio.c_cflag & ISORTIX_TERMMODE) && unicode == '\b' )
unicode = 127; unicode = 127;
if ( modifiers & MODIFIER_ALT && !(tio.c_lflag & ISORTIX_KBKEY) )
ProcessByte('\e');
if ( control && unicode == L' ' ) if ( control && unicode == L' ' )
ProcessByte(0, unicode); ProcessByte(0, unicode);
else if ( control && (L'`' <= unicode && unicode <= L'}') ) else if ( control && (L'`' <= unicode && unicode <= L'}') )