mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Add keyboard shortcuts (without GUI) for switching windows in the same zone (tabs) (#13973)
Authored-by: float4 <float4-unspecified-mail>
This commit is contained in:
@@ -89,6 +89,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
_highlightOpacity = Settings.Properties.FancyzonesHighlightOpacity.Value;
|
||||
_excludedApps = Settings.Properties.FancyzonesExcludedApps.Value;
|
||||
EditorHotkey = Settings.Properties.FancyzonesEditorHotkey.Value;
|
||||
_windowSwitching = Settings.Properties.FancyzonesWindowSwitching.Value;
|
||||
NextTabHotkey = Settings.Properties.FancyzonesNextTabHotkey.Value;
|
||||
PrevTabHotkey = Settings.Properties.FancyzonesPrevTabHotkey.Value;
|
||||
|
||||
// set the callback functions value to hangle outgoing IPC message.
|
||||
SendConfigMSG = ipcMSGCallBackFunc;
|
||||
@@ -127,6 +130,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
private int _highlightOpacity;
|
||||
private string _excludedApps;
|
||||
private HotkeySettings _editorHotkey;
|
||||
private bool _windowSwitching;
|
||||
private HotkeySettings _nextTabHotkey;
|
||||
private HotkeySettings _prevTabHotkey;
|
||||
private string _zoneInActiveColor;
|
||||
private string _zoneBorderColor;
|
||||
private string _zoneHighlightColor;
|
||||
@@ -152,6 +158,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
OnPropertyChanged(nameof(IsEnabled));
|
||||
OnPropertyChanged(nameof(SnapHotkeysCategoryEnabled));
|
||||
OnPropertyChanged(nameof(QuickSwitchEnabled));
|
||||
OnPropertyChanged(nameof(WindowSwitchingCategoryEnabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,6 +179,14 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool WindowSwitchingCategoryEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isEnabled && _windowSwitching;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShiftDrag
|
||||
{
|
||||
get
|
||||
@@ -604,7 +619,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
{
|
||||
if (value == null || value.IsEmpty())
|
||||
{
|
||||
_editorHotkey = FZConfigProperties.DefaultHotkeyValue;
|
||||
_editorHotkey = FZConfigProperties.DefaultEditorHotkeyValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -617,6 +632,78 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool WindowSwitching
|
||||
{
|
||||
get
|
||||
{
|
||||
return _windowSwitching;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _windowSwitching)
|
||||
{
|
||||
_windowSwitching = value;
|
||||
|
||||
Settings.Properties.FancyzonesWindowSwitching.Value = _windowSwitching;
|
||||
NotifyPropertyChanged();
|
||||
OnPropertyChanged(nameof(WindowSwitchingCategoryEnabled));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings NextTabHotkey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _nextTabHotkey;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _nextTabHotkey)
|
||||
{
|
||||
if (value == null || value.IsEmpty())
|
||||
{
|
||||
_nextTabHotkey = FZConfigProperties.DefaultNextTabHotkeyValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_nextTabHotkey = value;
|
||||
}
|
||||
|
||||
Settings.Properties.FancyzonesNextTabHotkey.Value = _nextTabHotkey;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HotkeySettings PrevTabHotkey
|
||||
{
|
||||
get
|
||||
{
|
||||
return _prevTabHotkey;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _prevTabHotkey)
|
||||
{
|
||||
if (value == null || value.IsEmpty())
|
||||
{
|
||||
_prevTabHotkey = FZConfigProperties.DefaultPrevTabHotkeyValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_prevTabHotkey = value;
|
||||
}
|
||||
|
||||
Settings.Properties.FancyzonesPrevTabHotkey.Value = _prevTabHotkey;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string ExcludedApps
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user