private void CreateInputListenerUserQueryPhase(IVsTextView view, IWpfTextView textView) { inputListenerUserQueryPhase = new InputListener(view, textView) { }; inputListenerUserQueryPhase.AddFilter(); inputListenerUserQueryPhase.KeyPressed += InputListenerOnKeyPressedCharAccumulation; userQueryAccumulatedKeyChars = null; }
private void CreateInputListener(IVsTextView view, IWpfTextView textView) { inputListener = new InputListener(view, textView) { }; inputListener.AddFilter(); inputListener.KeyPressed += InputListenerOnKeyPressed; accumulatedKeyChars = null; setStatusBarText($"Waiting for keys to execute jump >"); }
private void StopListening2Keyboard() { ThreadHelper.ThrowIfNotOnUIThread(); if (null != inputListener) { inputListener.KeyPressed -= InputListenerOnKeyPressed; inputListener.RemoveFilter(); inputListener = null; } if (null != inputListenerUserQueryPhase) { inputListenerUserQueryPhase.KeyPressed -= InputListenerOnKeyPressedCharAccumulation; inputListenerUserQueryPhase.RemoveFilter(); inputListenerUserQueryPhase = null; } }