ReactOS 0.4.16-dev-197-g92996da
keyboard.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KEYBOARD_BAT_SUCCESS   0xAA
 
#define KEYBOARD_ACK   0xFA
 
#define KEYBOARD_ERROR   0xFC
 
#define KEYBOARD_RESEND   0xFE
 

Functions

VOID KeyboardEventHandler (PKEY_EVENT_RECORD KeyEvent)
 
BOOLEAN KeyboardInit (BYTE PS2Connector)
 

Macro Definition Documentation

◆ KEYBOARD_ACK

#define KEYBOARD_ACK   0xFA

Definition at line 16 of file keyboard.h.

◆ KEYBOARD_BAT_SUCCESS

#define KEYBOARD_BAT_SUCCESS   0xAA

Definition at line 15 of file keyboard.h.

◆ KEYBOARD_ERROR

#define KEYBOARD_ERROR   0xFC

Definition at line 17 of file keyboard.h.

◆ KEYBOARD_RESEND

#define KEYBOARD_RESEND   0xFE

Definition at line 18 of file keyboard.h.

Function Documentation

◆ KeyboardEventHandler()

VOID KeyboardEventHandler ( PKEY_EVENT_RECORD  KeyEvent)

Definition at line 167 of file keyboard.c.

168{
169 WORD i;
170 BYTE ScanCode = (BYTE)KeyEvent->wVirtualScanCode;
171
172 /* Check if we're not reporting */
173 if (!KeyboardReporting) return;
174
175 /* If this is a key release, set the highest bit in the scan code */
176 if (!KeyEvent->bKeyDown) ScanCode |= 0x80;
177
178 /* Push the scan code into the PS/2 queue */
179 for (i = 0; i < KeyEvent->wRepeatCount; i++)
180 {
183 }
184
185 DPRINT("Press 0x%X\n", ScanCode);
186}
UINT ScanCode
Definition: VirtualKey.c:24
unsigned short WORD
Definition: ntddk_ex.h:93
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
if(dx< 0)
Definition: linetemp.h:194
BOOLEAN PS2QueuePush(BYTE PS2Port, BYTE Data)
Definition: ps2.c:486
#define DPRINT
Definition: sndvol32.h:73
WORD wVirtualScanCode
Definition: wincon.h:243
DWORD dwControlKeyState
Definition: wincon.h:248
WORD wRepeatCount
Definition: wincon.h:241
static BOOLEAN KeyboardReporting
Definition: keyboard.c:21
static BYTE KbdPS2Port
Definition: keyboard.c:25
#define ENHANCED_KEY
Definition: wincon.h:145
unsigned char BYTE
Definition: xxhash.c:193

Referenced by ConsoleEventThread().

◆ KeyboardInit()

BOOLEAN KeyboardInit ( BYTE  PS2Connector)

Definition at line 188 of file keyboard.c.

189{
190 /* Finish to plug the keyboard to the specified PS/2 port */
191 KbdPS2Port = PS2Connector;
193 return TRUE;
194}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
VOID PS2SetDeviceCmdProc(BYTE PS2Port, LPVOID Param, PS2_DEVICE_CMDPROC DeviceCommand)
Definition: ps2.c:478
static VOID WINAPI KeyboardCommand(LPVOID Param, BYTE Command)
Definition: keyboard.c:29

Referenced by EmulatorInitialize().