mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibVT: Fix emitting \0 when pressing a modifier key
This causes the kernel to return EOF, which in turn confuses everything. This is a regression from the LibVT port of VirtualConsole.
This commit is contained in:
parent
52711921c6
commit
66c6e0035e
Notes:
sideshowbarker
2024-07-19 05:56:59 +09:00
Author: https://github.com/bugaevc
Commit: 66c6e0035e
Pull-request: https://github.com/SerenityOS/serenity/pull/2445
Issue: https://github.com/SerenityOS/serenity/issues/91
Reviewed-by: https://github.com/alimpfard
1 changed files with 5 additions and 0 deletions
|
@ -1046,6 +1046,11 @@ void Terminal::handle_key_press(KeyCode key, u8 character, u8 flags)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!character) {
|
||||||
|
// Probably a modifier being pressed.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (shift && key == KeyCode::Key_Tab) {
|
if (shift && key == KeyCode::Key_Tab) {
|
||||||
emit_string("\033[Z");
|
emit_string("\033[Z");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue