Example #1
0
 private Task NewCancellableTask(CancellationToken token)
 {
     return(Task.Run(() =>
     {
         var keyPlayLists = mtk.ArrangeKeyPlays(mtk.Index);
         KeyController.KeyPlayBack(keyPlayLists, 1, cts.Token);
         _runningFlag = false;
     }, token));
 }
Example #2
0
 public ConfigForm(ArrayList _keyList, KeyController _kc, HotKeyManager _hkm)
 {
     keyList = _keyList;
     InitializeComponent();
     keyBindings = new[] { hotKeyControl1, hotKeyControl2, hotKeyControl3, hotKeyControl4, hotKeyControl5 };
     kc          = _kc;
     hkm         = _hkm;
     InitValue();
 }
Example #3
0
        public void KeyboardPress(Keys ctrKeys, Keys viKeys)
        {
            if (_lastCtrlKey != ctrKeys)
            {
                KeyController.keybd_event(this._lastCtrlKey, (byte)KeyController.MapVirtualKey((uint)this._lastCtrlKey, 0U), 2, 0);
                Thread.Sleep(8);
                if ((uint)ctrKeys > 0U)
                {
                    KeyController.keybd_event(ctrKeys, (byte)KeyController.MapVirtualKey((uint)ctrKeys, 0U), 0, 0);
                    Thread.Sleep(8);
                }
            }

            KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 0, 0);
            this._lastCtrlKey = ctrKeys;
        }
Example #4
0
 public AboutForm(KeyController _kc)
 {
     kc = _kc;
     InitializeComponent();
 }
Example #5
0
 private void KeyboardPress(Keys viKeys)
 {
     lock (this.keyLock)
         KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 0, 0);
 }
Example #6
0
 public void KeyboardRelease(Keys viKeys)
 {
     KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 2, 0);
 }