예제 #1
0
 public void KeyDownTest()
 {
     sender.KeyDown(VirtualKeys.VK_A);
     sender.KeyUp(VirtualKeys.VK_A);
     Assert.AreEqual(keyboardEvents[0].Item1, LowLevelKeyboardHook.Event.WM_KEYDOWN);
     Assert.AreEqual(keyboardEvents[0].Item2.vkCode, VirtualKeys.VK_A);
     Assert.AreEqual(keyboardEvents[0].Item2.scanCode, 0x00U);
     Assert.IsFalse(keyboardEvents[0].Item2.flags.HasFlag(LowLevelKeyboardHook.FLAGS.LLKHF_EXTENDED));
 }