mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
VirtualConsole: Only consume data from key-down events
This commit is contained in:
parent
dffdd5545a
commit
ce8387d1ed
Notes:
sideshowbarker
2024-07-19 12:42:48 +09:00
Author: https://github.com/deoxxa
Commit: ce8387d1ed
Pull-request: https://github.com/SerenityOS/serenity/pull/447
1 changed files with 2 additions and 0 deletions
|
@ -494,6 +494,8 @@ void VirtualConsole::on_char(u8 ch)
|
|||
|
||||
void VirtualConsole::on_key_pressed(KeyboardDevice::Event key)
|
||||
{
|
||||
if (!key.is_press())
|
||||
return;
|
||||
if (key.ctrl()) {
|
||||
if (key.character >= 'a' && key.character <= 'z') {
|
||||
emit(key.character - 'a' + 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue