private Task NewCancellableTask(CancellationToken token) { return(Task.Run(() => { var keyPlayLists = mtk.ArrangeKeyPlays(mtk.Index); KeyController.KeyPlayBack(keyPlayLists, 1, cts.Token); _runningFlag = false; }, token)); }
public ConfigForm(ArrayList _keyList, KeyController _kc, HotKeyManager _hkm) { keyList = _keyList; InitializeComponent(); keyBindings = new[] { hotKeyControl1, hotKeyControl2, hotKeyControl3, hotKeyControl4, hotKeyControl5 }; kc = _kc; hkm = _hkm; InitValue(); }
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; }
public AboutForm(KeyController _kc) { kc = _kc; InitializeComponent(); }
private void KeyboardPress(Keys viKeys) { lock (this.keyLock) KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 0, 0); }
public void KeyboardRelease(Keys viKeys) { KeyController.keybd_event(viKeys, (byte)KeyController.MapVirtualKey((uint)viKeys, 0U), 2, 0); }