mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
[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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user