diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw
index 276b345dde..00e1744b6a 100644
--- a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw
+++ b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw
@@ -281,8 +281,8 @@
Zone highlight opacity
-
- Edit hot key / shortcut
+
+ Edit hotkey / shortcut
Launch zones editor
@@ -590,4 +590,13 @@
You need to run as administrator to use this setting
+
+ Only shortcuts with the following hotkeys are valid: Win, Ctrl, Alt, Shift.
+
+
+ Only shortcuts with the following hotkeys are valid: Win, Ctrl, Alt, Shift.
+
+
+ Only shortcuts with the following hotkeys are valid: Win, Ctrl, Alt, Shift.
+
\ No newline at end of file
diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs
index 6de0e3fdaa..5af5e21059 100644
--- a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs
+++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs
@@ -49,13 +49,13 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
this._makeDraggedWindowTransparent = Settings.Properties.FancyzonesMakeDraggedWindowTransparent.Value;
this._highlightOpacity = Settings.Properties.FancyzonesHighlightOpacity.Value;
this._excludedApps = Settings.Properties.FancyzonesExcludedApps.Value;
- this._editorHotkey = Settings.Properties.FancyzonesEditorHotkey.Value;
+ this.EditorHotkey = Settings.Properties.FancyzonesEditorHotkey.Value;
string inactiveColor = Settings.Properties.FancyzonesInActiveColor.Value;
this._zoneInActiveColor = inactiveColor != string.Empty ? inactiveColor.ToColor() : "#F5FCFF".ToColor();
string borderColor = Settings.Properties.FancyzonesBorderColor.Value;
- this._zoneBorderColor = borderColor != string.Empty ? borderColor.ToColor() : "#FFFFFF".ToColor();
+ this._zoneBorderColor = borderColor != string.Empty ? borderColor.ToColor() : "#FFFFFF".ToColor();
string highlightColor = Settings.Properties.FancyzonesZoneHighlightColor.Value;
this._zoneHighlightColor = highlightColor != string.Empty ? highlightColor.ToColor() : "#0078D7".ToColor();
@@ -378,8 +378,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
{
if (value != _editorHotkey)
{
- _editorHotkey = value;
- Settings.Properties.FancyzonesEditorHotkey.Value = value;
+ if (value.IsEmpty())
+ {
+ _editorHotkey = new HotkeySettings(true, false, false, false, "'", 192);
+ }
+ else
+ {
+ _editorHotkey = value;
+ }
+
+ Settings.Properties.FancyzonesEditorHotkey.Value = _editorHotkey;
RaisePropertyChanged();
}
}
diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml
index 96088f1fb6..b6fcf13cf3 100644
--- a/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml
+++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml
@@ -70,19 +70,30 @@
-
+
+
+
+
+
+
+
+
+ x:Uid="FancyZones_HotkeyEditorControl_TextBox"
+ Width="240"
+ HorizontalAlignment="Left"
+ Margin="0,5,0,0"
+ HotkeySettings="{x:Bind Path=ViewModel.EditorHotkey, Mode=TwoWay}"
+ IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"
+ />