1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:17:45 +00:00

Kernel: Pass TTY-switch keyboard combo to userspace

This commit is contained in:
Sahan Fernando 2021-06-20 20:06:56 +10:00 committed by Andreas Kling
parent 4f53e52ca3
commit ae5d961d97

View file

@ -68,20 +68,12 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
case I8042_ACK: case I8042_ACK:
break; break;
default: default:
if (m_modifiers & Mod_Alt) { if ((m_modifiers & Mod_Alt) != 0 && ch >= 2 && ch <= ConsoleManagement::s_max_virtual_consoles + 1) {
switch (ch) { g_io_work->queue([this, ch]() {
case 0x02 ... 0x01 + ConsoleManagement::s_max_virtual_consoles: ConsoleManagement::the().switch_to(ch - 0x02);
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);
} }
key_state_changed(ch, pressed);
} }
} }