mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Kernel: Pass TTY-switch keyboard combo to userspace
This commit is contained in:
parent
4f53e52ca3
commit
ae5d961d97
Notes:
sideshowbarker
2024-07-18 11:31:28 +09:00
Author: https://github.com/ccapitalK Commit: https://github.com/SerenityOS/serenity/commit/ae5d961d974 Pull-request: https://github.com/SerenityOS/serenity/pull/7130 Reviewed-by: https://github.com/Dexesttp Reviewed-by: https://github.com/IdanHo
@ -68,20 +68,12 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
|
||||
case I8042_ACK:
|
||||
break;
|
||||
default:
|
||||
if (m_modifiers & Mod_Alt) {
|
||||
switch (ch) {
|
||||
case 0x02 ... 0x01 + ConsoleManagement::s_max_virtual_consoles:
|
||||
g_io_work->queue([this, ch]() {
|
||||
ConsoleManagement::the().switch_to(ch - 0x02);
|
||||
});
|
||||
break;
|
||||
default:
|
||||
key_state_changed(ch, pressed);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
key_state_changed(ch, pressed);
|
||||
if ((m_modifiers & Mod_Alt) != 0 && ch >= 2 && ch <= ConsoleManagement::s_max_virtual_consoles + 1) {
|
||||
g_io_work->queue([this, ch]() {
|
||||
ConsoleManagement::the().switch_to(ch - 0x02);
|
||||
});
|
||||
}
|
||||
key_state_changed(ch, pressed);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user