public void OnBindedKeyHoldEvent(object caller, KeyBindEventArgs e) { System.Drawing.Point caretPosition = GlobalCaretPosition.GetCurrentCaretPosition(); Debug.WriteLine("Caret position: {0} {1}", caretPosition.X, caretPosition.Y); this.windowUIHelper.CreateNewButtons(e.Binding.Value); this.windowUIHelper.ShowWindow(caretPosition); if (!this.IsActive) { this.windowWin32Helper.forceSetForegroundWindow(); } }
private void OnBindedKeyHold(object sender, KeyBindEventArgs e) { Debug.WriteLine("Key Hold event on {0} ({1}) after {2}ms \t values: {3}", e.KeyHoldEvent.KeyInfo.Key, e.KeyHoldEvent.KeyInfo.KeyCode, e.KeyHoldEvent.TimeHoldedKey, String.Join(", ", e.Binding.Value)); this.BindedKeyHoldEvent?.Invoke(this, e); e.Handled = true; }