mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:27:35 +00:00
Kernel: Pass TTY-switch keyboard combo to userspace
This commit is contained in:
parent
4f53e52ca3
commit
ae5d961d97
1 changed files with 5 additions and 13 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue