public MacroKeyboard Down(Key Key) { int num = KeyInterop.VirtualKeyFromKey(Key); StaticFunction.keybd_event((byte)num, (byte)(bScanDict.ContainsKey(num) ? bScanDict[num] : 0), 0, IntPtr.Zero); return(this); }
public MacroKeyboard Up(Key Key) { if (KeyHolder.IsRegist(Key)) { KeyHolder.Unregist(Key); } int num = KeyInterop.VirtualKeyFromKey(Key); StaticFunction.keybd_event((byte)num, (byte)(bScanDict.ContainsKey(num) ? bScanDict[num] : 0), 2, IntPtr.Zero); return(this); }