2 * COPYRIGHT: GPL - See COPYING in the top level directory
3 * PROJECT: ReactOS Virtual DOS Machine
5 * PURPOSE: Keyboard emulation
6 * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org>
9 /* INCLUDES *******************************************************************/
16 static BYTE PS2Port
= 0;
18 /* PUBLIC FUNCTIONS ***********************************************************/
20 VOID
KeyboardEventHandler(PKEY_EVENT_RECORD KeyEvent
)
23 BYTE ScanCode
= (BYTE
)KeyEvent
->wVirtualScanCode
;
25 /* If this is a key release, set the highest bit in the scan code */
26 if (!KeyEvent
->bKeyDown
) ScanCode
|= 0x80;
28 /* Push the scan code into the PS/2 queue */
29 for (i
= 0; i
< KeyEvent
->wRepeatCount
; i
++)
31 PS2QueuePush(PS2Port
, ScanCode
);
34 // PicInterruptRequest(1);
37 VOID
KeyboardCommand(BYTE Command
)
42 BOOLEAN
KeyboardInit(BYTE PS2Connector
)
44 PS2Port
= PS2Connector
;