internal bool SetControlIfCapturing(System.Windows.Input.Key key) { if (!IsCapturing || _captureState != CaptureState.CaptureKeyboard) { return(false); } LoadedConfiguration.SetKeyboardInput(_controlToCapture, key); UpdateAllButtonText(); IsCapturing = false; HasUnsavedChanges = true; _captureState = CaptureState.NotCapturing; return(true); }
internal bool SetNumpadEnterControlIfCapturing() { if (!IsCapturing) { return(false); } ControlInputSetting numpadEnterSetting = ControlMapper.ControlInputs.Where(c => c.DisplayText == "NUMPADENTER").FirstOrDefault(); LoadedConfiguration.SetKeyboardInput(_controlToCapture, numpadEnterSetting); UpdateAllButtonText(); IsCapturing = false; HasUnsavedChanges = true; _captureState = CaptureState.NotCapturing; return(true); }