mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Connect Wox's existing "ignore hotkeys in fullscreen mode" setting to PowerLauncher and the PowerToys settings UI. This allows PowerLauncher to ignore hotkeys if any application is currently in fullscreen mode, whether it's real exclusive fullscreen or borderless windowed mode. This applies to things like fullscreen games, video and presentations but not maximized windows.
This commit is contained in:
@@ -24,6 +24,8 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
|
||||
public bool override_win_s_key { get; set; }
|
||||
|
||||
public bool ignore_hotkeys_in_fullscreen { get; set; }
|
||||
|
||||
public PowerLauncherProperties()
|
||||
{
|
||||
open_powerlauncher = new HotkeySettings();
|
||||
@@ -32,6 +34,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
open_console = new HotkeySettings();
|
||||
search_result_preference = "most_recently_used";
|
||||
search_type_preference = "application_name";
|
||||
ignore_hotkeys_in_fullscreen = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,6 +250,9 @@
|
||||
<data name="PowerLauncher_OverrideWinSKey.Content" xml:space="preserve">
|
||||
<value>Override Win+S key</value>
|
||||
</data>
|
||||
<data name="PowerLauncher_IgnoreHotkeysInFullScreen.Content" xml:space="preserve">
|
||||
<value>Ignore hotkeys in fullscreen mode</value>
|
||||
</data>
|
||||
<data name="KeyboardManager_KeysMappingLayoutRightHeader.Text" xml:space="preserve">
|
||||
<value>To:</value>
|
||||
<comment>Keyboard Manager mapping keys view right header</comment>
|
||||
|
||||
@@ -235,5 +235,22 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool IgnoreHotkeysInFullScreen
|
||||
{
|
||||
get
|
||||
{
|
||||
return settings.properties.ignore_hotkeys_in_fullscreen;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (settings.properties.ignore_hotkeys_in_fullscreen != value)
|
||||
{
|
||||
settings.properties.ignore_hotkeys_in_fullscreen = value;
|
||||
UpdateSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,6 +128,12 @@
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.OverrideWinSKey}"
|
||||
IsEnabled="False"
|
||||
/>-->
|
||||
|
||||
<CheckBox x:Uid="PowerLauncher_IgnoreHotkeysInFullScreen"
|
||||
Margin="{StaticResource SmallTopMargin}"
|
||||
IsChecked="{x:Bind Mode=TwoWay, Path=ViewModel.IgnoreHotkeysInFullScreen}"
|
||||
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}"
|
||||
/>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
x:Name="SidePanel"
|
||||
|
||||
@@ -66,6 +66,11 @@ namespace PowerLauncher
|
||||
{
|
||||
_settings.MaxResultsToShow = overloadSettings.properties.maximum_number_of_results;
|
||||
}
|
||||
|
||||
if (_settings.IgnoreHotkeysOnFullscreen != overloadSettings.properties.ignore_hotkeys_in_fullscreen)
|
||||
{
|
||||
_settings.IgnoreHotkeysOnFullscreen = overloadSettings.properties.ignore_hotkeys_in_fullscreen;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user