Home > Software engineering >  Winio simulation ps/2 keyboard input
Winio simulation ps/2 keyboard input

Time:09-26

A simulation example of keyboard input "" winio simulation button (no PS2 keyboard, not testing), close test is feasible, but have a doubt,

 void MyKeyDown (int vKeyCoad) 
{
Bool bRtn=true;
Int btScancode=0;
BtScancode=MapVirtualKey (vKeyCoad, 0);
KBCWait4IBE ();//wait for keyboard buffer is empty
BRtn=setPortVal (KBC_KEY_CMD xd2 0, 1);//send the command
KBCWait4IBE ();
BRtn=setPortVal (KBC_KEY_DATA xe2 0, 1);//write key information
KBCWait4IBE ();//'waiting for the keyboard buffer is empty
BRtn=setPortVal (KBC_KEY_CMD xd2 0, 1); Send the keyboard to write commands//'
KBCWait4IBE ();
BRtn=setPortVal (KBC_KEY_DATA btScancode, 1);//'written press keys
}


This code in bRtn=setPortVal (KBC_KEY_DATA xe2 0, 1) do? At which familiar help explain,

CodePudding user response:

Baidu search PS2 keyboard communication protocol?

CodePudding user response:

CodePudding user response:

The find, didn't find the byte 0 xe2
  • Related