ReactOS  0.4.14-dev-50-g13bb5e2
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  {
181  if (KeyEvent->dwControlKeyState & ENHANCED_KEY) PS2QueuePush(KbdPS2Port, 0xE0);
183  }
184 
185  DPRINT("Press 0x%X\n", ScanCode);
186 }
ULONG ScanCode
Definition: api.c:39
WORD wVirtualScanCode
Definition: wincon.h:228
DWORD dwControlKeyState
Definition: wincon.h:233
BOOLEAN PS2QueuePush(BYTE PS2Port, BYTE Data)
Definition: ps2.c:486
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
WORD wRepeatCount
Definition: wincon.h:226
void DPRINT(...)
Definition: polytest.cpp:61
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define ENHANCED_KEY
Definition: wincon.h:139
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned char BYTE
Definition: mem.h:68
static BOOLEAN KeyboardReporting
Definition: keyboard.c:21
static BYTE KbdPS2Port
Definition: keyboard.c:25

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 TRUE
Definition: types.h:120
smooth NULL
Definition: ftsmooth.c:416
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
static BYTE KbdPS2Port
Definition: keyboard.c:25

Referenced by EmulatorInitialize().