mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
Kernel+Userland: Implement support for PS2 scan code set 2
This scan code set is more advanced than the basic scan code set 1, and is required to be supported for some bare metal hardware that might not properly enable the PS2 first port translation in the i8042 controller. LibWeb can now also generate bindings for keyboard events like the Pause key, as well as other function keys (such as Right Alt, etc). The logic for handling scan code sets is implemented by the PS2 keyboard driver and is abstracted from the main HID KeyboardDevice code which only handles "standard" KeyEvent(s).
This commit is contained in:
parent
cae184d7cf
commit
c8f27d7cb8
12 changed files with 991 additions and 439 deletions
|
@ -7,13 +7,14 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/HID/Definitions.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
struct ScanCodeEvent {
|
||||
u32 scan_code_value { 0 };
|
||||
bool pressed { false };
|
||||
bool e0_prefix { false };
|
||||
Array<u8, 8> scan_code_bytes;
|
||||
ScanCodeSet sent_scan_code_set { ScanCodeSet::Set1 };
|
||||
u8 bytes_count { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue