[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:
Jaime Bernardo
2022-06-12 14:12:10 +01:00
committed by GitHub
parent b33bc2ecd0
commit 1490fb300c
8 changed files with 185 additions and 7 deletions

View File

@@ -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;
}
}
}

View File

@@ -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