浏览代码

Kernel: Make all 6 VirtualConsoles available via shortcut

Add all 6 shortcuts even if the switch between VirtualConsoles is
currently not available in the graphical console.

Also make the case statement more compact.
Florian Angermeier 5 年之前
父节点
当前提交
c969b8390d
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      Kernel/Devices/KeyboardDevice.cpp

+ 1 - 4
Kernel/Devices/KeyboardDevice.cpp

@@ -321,10 +321,7 @@ void KeyboardDevice::handle_irq(const RegisterState&)
         default:
             if (m_modifiers & Mod_Alt) {
                 switch (ch) {
-                case 0x02: // 1
-                case 0x03: // 2
-                case 0x04: // 3
-                case 0x05: // 4
+                case 0x02 ... 0x07: // 1 to 6
                     VirtualConsole::switch_to(ch - 0x02);
                     break;
                 default: