mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[PTRun]Add setting to disable input delay (#18724)
* [PTRun]Add setting to disable input delay * Address feedback and allow configuring delay * Address PR feedback
This commit is contained in:
@@ -51,6 +51,12 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
[JsonPropertyName("use_centralized_keyboard_hook")]
|
||||
public bool UseCentralizedKeyboardHook { get; set; }
|
||||
|
||||
[JsonPropertyName("search_query_results_with_delay")]
|
||||
public bool SearchQueryResultsWithDelay { get; set; }
|
||||
|
||||
[JsonPropertyName("search_input_delay")]
|
||||
public int SearchInputDelay { get; set; }
|
||||
|
||||
public PowerLauncherProperties()
|
||||
{
|
||||
OpenPowerLauncher = new HotkeySettings(false, false, true, false, 32);
|
||||
@@ -65,6 +71,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
Theme = Theme.System;
|
||||
Position = StartupPosition.Cursor;
|
||||
UseCentralizedKeyboardHook = false;
|
||||
SearchQueryResultsWithDelay = true;
|
||||
SearchInputDelay = 150;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,6 +296,40 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool SearchQueryResultsWithDelay
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.SearchQueryResultsWithDelay;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.SearchQueryResultsWithDelay != value)
|
||||
{
|
||||
settings.Properties.SearchQueryResultsWithDelay = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int SearchInputDelay
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.Properties.SearchInputDelay;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.Properties.SearchInputDelay != value)
|
||||
{
|
||||
settings.Properties.SearchInputDelay = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings OpenFileLocation
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user