[PT Run] Add setting to use centralized keyboard hook (#13557)

* [PT Run] Add setting to use centralized hook

* Add UI separator
This commit is contained in:
Jaime Bernardo
2021-10-01 14:59:52 +01:00
committed by GitHub
parent 55054f1fa6
commit 84b2ae3e8f
11 changed files with 124 additions and 29 deletions

View File

@@ -48,6 +48,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
[JsonPropertyName("startupPosition")]
public StartupPosition Position { get; set; }
[JsonPropertyName("use_centralized_keyboard_hook")]
public bool UseCentralizedKeyboardHook { get; set; }
public PowerLauncherProperties()
{
OpenPowerLauncher = new HotkeySettings(false, false, true, false, 32);
@@ -61,6 +64,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
MaximumNumberOfResults = 4;
Theme = Theme.System;
Position = StartupPosition.Cursor;
UseCentralizedKeyboardHook = false;
}
}
}

View File

@@ -275,6 +275,23 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
public bool UseCentralizedKeyboardHook
{
get
{
return settings.Properties.UseCentralizedKeyboardHook;
}
set
{
if (settings.Properties.UseCentralizedKeyboardHook != value)
{
settings.Properties.UseCentralizedKeyboardHook = value;
UpdateSettings();
}
}
}
public HotkeySettings OpenFileLocation
{
get