[Shortcut Guide] Activate with Windows key press (#13342)

* [Shortcut Guide] Activate with Windows key press

* fix spellchecker

* pr comments: fix search and add lock

* Add activation method combo box

* fix spellchecker issue for customized

* Standardize centralized hotkeys file names

* Add warning when using the long win key method

* Address PR feedback on text

* More PR feedback
This commit is contained in:
Jaime Bernardo
2021-09-23 14:23:22 +01:00
committed by GitHub
parent a0ebe5ed54
commit f647223e94
15 changed files with 308 additions and 20 deletions

View File

@@ -11,6 +11,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public ShortcutGuideProperties()
{
OverlayOpacity = new IntProperty(90);
UseLegacyPressWinKeyBehavior = new BoolProperty(false);
PressTime = new IntProperty(900);
Theme = new StringProperty("system");
DisabledApps = new StringProperty();
@@ -23,6 +24,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("overlay_opacity")]
public IntProperty OverlayOpacity { get; set; }
[JsonPropertyName("use_legacy_press_win_key_behavior")]
public BoolProperty UseLegacyPressWinKeyBehavior { get; set; }
[JsonPropertyName("press_time")]
public IntProperty PressTime { get; set; }

View File

@@ -52,6 +52,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
SendConfigMSG = ipcMSGCallBackFunc;
_isEnabled = GeneralSettingsConfig.Enabled.ShortcutGuide;
_useLegacyPressWinKeyBehavior = Settings.Properties.UseLegacyPressWinKeyBehavior.Value;
_pressTime = Settings.Properties.PressTime.Value;
_opacity = Settings.Properties.OverlayOpacity.Value;
_disabledApps = Settings.Properties.DisabledApps.Value;
@@ -66,6 +67,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
private bool _isEnabled;
private int _themeIndex;
private bool _useLegacyPressWinKeyBehavior;
private int _pressTime;
private int _opacity;
@@ -151,6 +153,42 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
public bool UseLegacyPressWinKeyBehavior
{
get
{
return _useLegacyPressWinKeyBehavior;
}
set
{
if (_useLegacyPressWinKeyBehavior != value)
{
_useLegacyPressWinKeyBehavior = value;
Settings.Properties.UseLegacyPressWinKeyBehavior.Value = value;
NotifyPropertyChanged();
}
}
}
public int PressTime
{
get
{
return _pressTime;
}
set
{
if (_pressTime != value)
{
_pressTime = value;
Settings.Properties.PressTime.Value = value;
NotifyPropertyChanged();
}
}
}
public string DisabledApps
{
get