mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[Keyboard Manager] Allow whitespace-only TextRemappings (#46510)
Title. Closes #46453
This commit is contained in:
@@ -564,7 +564,7 @@ namespace KeyboardManagerEditorUI.Controls
|
||||
return CurrentActionType switch
|
||||
{
|
||||
ActionType.KeyOrShortcut => _actionKeys.Count > 0,
|
||||
ActionType.Text => !string.IsNullOrWhiteSpace(TextContentBox?.Text),
|
||||
ActionType.Text => !string.IsNullOrEmpty(TextContentBox?.Text),
|
||||
ActionType.OpenUrl => !string.IsNullOrWhiteSpace(UrlPathInput?.Text),
|
||||
ActionType.OpenApp => !string.IsNullOrWhiteSpace(ProgramPathInput?.Text),
|
||||
_ => false,
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace KeyboardManagerEditorUI.Helpers
|
||||
return ValidationErrorType.EmptyOriginalKeys;
|
||||
}
|
||||
|
||||
if (string.IsNullOrWhiteSpace(textContent))
|
||||
if (string.IsNullOrEmpty(textContent))
|
||||
{
|
||||
return ValidationErrorType.EmptyTargetText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user