/// <inheritdoc/>> public void StopProcessingKeyboardEvents() { lock (_lock) { if (_isProcessingKeyboardEvents) { _isProcessingKeyboardEvents = false; _taskCompletionSource.SetResult(true); _keyHandler.StopCurrentlyRunningKeyFunction(); } } }