mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +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
|
||||
|
||||
@@ -401,6 +401,9 @@
|
||||
<data name="PowerLauncher_IgnoreHotkeysInFullScreen.Content" xml:space="preserve">
|
||||
<value>Ignore shortcuts in fullscreen mode</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_UseCentralizedKeyboardHook.Content" xml:space="preserve">
|
||||
<value>Use centralized keyboard hook (try it if there are issues with the shortcut)</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_ClearInputOnLaunch.Content" xml:space="preserve">
|
||||
<value>Clear the previous query on launch</value>
|
||||
</data>
|
||||
|
||||
@@ -45,6 +45,8 @@
|
||||
</controls:SettingExpander.Header>
|
||||
<controls:SettingExpander.Content>
|
||||
<StackPanel>
|
||||
<CheckBox x:Uid="PowerLauncher_UseCentralizedKeyboardHook" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.UseCentralizedKeyboardHook}" Margin="{StaticResource ExpanderSettingMargin}" />
|
||||
<Rectangle Style="{StaticResource ExpanderSeparatorStyle}" />
|
||||
<CheckBox x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen" IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}" Margin="{StaticResource ExpanderSettingMargin}" />
|
||||
</StackPanel>
|
||||
</controls:SettingExpander.Content>
|
||||
|
||||
Reference in New Issue
Block a user