KeyboardState oState = Keyboard.GetState();
var oPressedKeys = oState.GetPressedKeys();
foreach (Keys oKey in oPressedKeys)
{
Console.WriteLine(oKey.ToString());
}
if (oState.IsKeyDown(oQuit))
{
return eReturnTypes.Terminate;
}
即使我捣毁键盘也不会写任何东西。