Go to the documentation of this file.
18 #include <FreeNOS/User.h>
28 {0x0, 0x0}, {0x0, 0x0}, {
'1',
'!'}, {
'2',
'@'},
29 {
'3',
'#'}, {
'4',
'$'}, {
'5',
'%'}, {
'6',
'^'},
30 {
'7',
'&'}, {
'8',
'*'}, {
'9',
'('}, {
'0',
')'},
31 {
'-',
'_'}, {
'=',
'+'}, {
'\b',
'\b'},{
'\t',
'\t'},
32 {
'q',
'Q'}, {
'w',
'W'}, {
'e',
'E'}, {
'r',
'R'},
33 {
't',
'T'}, {
'y',
'Y'}, {
'u',
'U'}, {
'i',
'I'},
34 {
'o',
'O'}, {
'p',
'P'}, {
'[',
'{'}, {
']',
'}'},
35 {
'\n',
'\n'},{0x0, 0x0}, {
'a',
'A'}, {
's',
'S'},
36 {
'd',
'D'}, {
'f',
'F'}, {
'g',
'G'}, {
'h',
'H'},
37 {
'j',
'J'}, {
'k',
'K'}, {
'l',
'L'}, {
';',
':'},
38 {
'\'',
'\"'},{
'`',
'~'}, {0x0, 0x0}, {
'\\',
'|'},
39 {
'z',
'Z'}, {
'x',
'X'}, {
'c',
'C'}, {
'v',
'V'},
40 {
'b',
'B'}, {
'n',
'N'}, {
'm',
'M'}, {
',',
'<'},
41 {
'.',
'>'}, {
'/',
'?'}, {0x0, 0x0}, {
'*',
'*'},
42 {0x0, 0x0}, {
' ',
' '}
78 if (keycode == 0x2a || keycode == 0xaa)
virtual FileSystem::Result read(IOBuffer &buffer, Size &size, const Size offset)
Read a character from the keyboard.
#define PS2_RELEASE
Bit is set in the scancode, if a key is released.
Arch::IO m_io
Port I/O object.
Abstract device class interface.
bool pending
Do we have a byte ready?
API::Result ProcessCtl(const ProcessID proc, const ProcessOperation op, const Address addr=0, const Address output=0)
Prototype for user applications.
virtual FileSystem::Result interrupt(const Size vector)
Executed when a key state has changed.
u8 shiftState
State of the shift key.
Abstract Input/Output buffer.
unsigned int u32
Unsigned 32-bit number.
unsigned int Size
Any sane size indicator cannot go negative.
#define PS2_IRQ
Interrupt number of the i8042 controller.
String m_identifier
Unique identifier for this Device.
static const char keymap[0x3a][2]
Keyboard map table.
Result
Result code for filesystem Actions.
unsigned char u8
Unsigned 8-bit number.
virtual FileSystem::Result initialize()
Initialize the device.
Keyboard(const u32 inode)
Constructor.
FileSystem::Result write(const void *buffer, const Size size, const Size offset=ZERO)
Write bytes to the I/O buffer.
#define PS2_PORT
PS2 Keyboard input port.