コード例 #1
0
 public void KeyDownWithScanCodeTest()
 {
     sender.KeyDownWithScanCode(VirtualKeys.VK_A);
     sender.KeyUpWithScanCode(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, 0x1EU);
     Assert.IsFalse(keyboardEvents[0].Item2.flags.HasFlag(LowLevelKeyboardHook.FLAGS.LLKHF_EXTENDED));
 }