[NTVDM]
[reactos.git] / reactos / subsystems / ntvdm / hardware / keyboard.c
index d5669ce..520d503 100644 (file)
 #include "keyboard.h"
 #include "ps2.h"
 
+/* PRIVATE VARIABLES **********************************************************/
+
 static BYTE PS2Port = 0;
 
+/* PRIVATE FUNCTIONS **********************************************************/
+
+static VOID WINAPI KeyboardCommand(LPVOID Param, BYTE Command)
+{
+    UNIMPLEMENTED;
+}
+
 /* PUBLIC FUNCTIONS ***********************************************************/
 
 VOID KeyboardEventHandler(PKEY_EVENT_RECORD KeyEvent)
@@ -31,16 +40,14 @@ VOID KeyboardEventHandler(PKEY_EVENT_RECORD KeyEvent)
         PS2QueuePush(PS2Port, ScanCode);
     }
 
-    // PicInterruptRequest(1);
-}
-
-VOID KeyboardCommand(BYTE Command)
-{
-    UNIMPLEMENTED;
+    DPRINT("Press 0x%X\n", ScanCode);
 }
 
 BOOLEAN KeyboardInit(BYTE PS2Connector)
 {
+    /* Finish to plug the keyboard to the specified PS/2 port */
     PS2Port = PS2Connector;
+    PS2SetDeviceCmdProc(PS2Port, NULL, KeyboardCommand);
+
     return TRUE;
 }