Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }