mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 20:57:22 +02:00
[FindMyMouse]Add Win+Ctrl double press option (#32802)
* [FindMyMouse] Add Win+Ctrl double press option * use includeWinKey default const in SuperSonar * Add some comments regarding the bitmask * Fix XAML style
This commit is contained in:
@@ -65,6 +65,7 @@ protected:
|
|||||||
|
|
||||||
bool m_destroyed = false;
|
bool m_destroyed = false;
|
||||||
FindMyMouseActivationMethod m_activationMethod = FIND_MY_MOUSE_DEFAULT_ACTIVATION_METHOD;
|
FindMyMouseActivationMethod m_activationMethod = FIND_MY_MOUSE_DEFAULT_ACTIVATION_METHOD;
|
||||||
|
bool m_includeWinKey = FIND_MY_MOUSE_DEFAULT_INCLUDE_WIN_KEY;
|
||||||
bool m_doNotActivateOnGameMode = FIND_MY_MOUSE_DEFAULT_DO_NOT_ACTIVATE_ON_GAME_MODE;
|
bool m_doNotActivateOnGameMode = FIND_MY_MOUSE_DEFAULT_DO_NOT_ACTIVATE_ON_GAME_MODE;
|
||||||
int m_sonarRadius = FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_RADIUS;
|
int m_sonarRadius = FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_RADIUS;
|
||||||
int m_sonarZoomFactor = FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_INITIAL_ZOOM;
|
int m_sonarZoomFactor = FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_INITIAL_ZOOM;
|
||||||
@@ -146,6 +147,7 @@ private:
|
|||||||
void OnMouseTimer();
|
void OnMouseTimer();
|
||||||
|
|
||||||
void DetectShake();
|
void DetectShake();
|
||||||
|
bool KeyboardInputCanActivate();
|
||||||
|
|
||||||
void StartSonar();
|
void StartSonar();
|
||||||
void StopSonar();
|
void StopSonar();
|
||||||
@@ -352,7 +354,7 @@ void SuperSonar<D>::OnSonarKeyboardInput(RAWINPUT const& input)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case SonarState::ControlUp1:
|
case SonarState::ControlUp1:
|
||||||
if (pressed)
|
if (pressed && KeyboardInputCanActivate())
|
||||||
{
|
{
|
||||||
auto now = GetTickCount64();
|
auto now = GetTickCount64();
|
||||||
auto doubleClickInterval = now - m_lastKeyTime;
|
auto doubleClickInterval = now - m_lastKeyTime;
|
||||||
@@ -438,6 +440,12 @@ void SuperSonar<D>::DetectShake()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename D>
|
||||||
|
bool SuperSonar<D>::KeyboardInputCanActivate()
|
||||||
|
{
|
||||||
|
return !m_includeWinKey || (GetAsyncKeyState(VK_LWIN) & 0x8000) || (GetAsyncKeyState(VK_RWIN) & 0x8000);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename D>
|
template<typename D>
|
||||||
void SuperSonar<D>::OnSonarMouseInput(RAWINPUT const& input)
|
void SuperSonar<D>::OnSonarMouseInput(RAWINPUT const& input)
|
||||||
{
|
{
|
||||||
@@ -762,6 +770,7 @@ public:
|
|||||||
m_backgroundColor = settings.backgroundColor;
|
m_backgroundColor = settings.backgroundColor;
|
||||||
m_spotlightColor = settings.spotlightColor;
|
m_spotlightColor = settings.spotlightColor;
|
||||||
m_activationMethod = settings.activationMethod;
|
m_activationMethod = settings.activationMethod;
|
||||||
|
m_includeWinKey = settings.includeWinKey;
|
||||||
m_doNotActivateOnGameMode = settings.doNotActivateOnGameMode;
|
m_doNotActivateOnGameMode = settings.doNotActivateOnGameMode;
|
||||||
m_fadeDuration = settings.animationDurationMs > 0 ? settings.animationDurationMs : 1;
|
m_fadeDuration = settings.animationDurationMs > 0 ? settings.animationDurationMs : 1;
|
||||||
m_finalAlphaNumerator = settings.overlayOpacity;
|
m_finalAlphaNumerator = settings.overlayOpacity;
|
||||||
@@ -791,6 +800,7 @@ public:
|
|||||||
m_backgroundColor = localSettings.backgroundColor;
|
m_backgroundColor = localSettings.backgroundColor;
|
||||||
m_spotlightColor = localSettings.spotlightColor;
|
m_spotlightColor = localSettings.spotlightColor;
|
||||||
m_activationMethod = localSettings.activationMethod;
|
m_activationMethod = localSettings.activationMethod;
|
||||||
|
m_includeWinKey = localSettings.includeWinKey;
|
||||||
m_doNotActivateOnGameMode = localSettings.doNotActivateOnGameMode;
|
m_doNotActivateOnGameMode = localSettings.doNotActivateOnGameMode;
|
||||||
m_fadeDuration = localSettings.animationDurationMs > 0 ? localSettings.animationDurationMs : 1;
|
m_fadeDuration = localSettings.animationDurationMs > 0 ? localSettings.animationDurationMs : 1;
|
||||||
m_finalAlphaNumerator = localSettings.overlayOpacity;
|
m_finalAlphaNumerator = localSettings.overlayOpacity;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ constexpr int FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_RADIUS = 100;
|
|||||||
constexpr int FIND_MY_MOUSE_DEFAULT_ANIMATION_DURATION_MS = 500;
|
constexpr int FIND_MY_MOUSE_DEFAULT_ANIMATION_DURATION_MS = 500;
|
||||||
constexpr int FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_INITIAL_ZOOM = 9;
|
constexpr int FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_INITIAL_ZOOM = 9;
|
||||||
constexpr FindMyMouseActivationMethod FIND_MY_MOUSE_DEFAULT_ACTIVATION_METHOD = FindMyMouseActivationMethod::DoubleLeftControlKey;
|
constexpr FindMyMouseActivationMethod FIND_MY_MOUSE_DEFAULT_ACTIVATION_METHOD = FindMyMouseActivationMethod::DoubleLeftControlKey;
|
||||||
|
constexpr bool FIND_MY_MOUSE_DEFAULT_INCLUDE_WIN_KEY = false;
|
||||||
constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_MINIMUM_DISTANCE = 1000;
|
constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_MINIMUM_DISTANCE = 1000;
|
||||||
constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_INTERVAL_MS = 1000;
|
constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_INTERVAL_MS = 1000;
|
||||||
constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_FACTOR = 400; // 400 percent
|
constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_FACTOR = 400; // 400 percent
|
||||||
@@ -25,6 +26,7 @@ constexpr int FIND_MY_MOUSE_DEFAULT_SHAKE_FACTOR = 400; // 400 percent
|
|||||||
struct FindMyMouseSettings
|
struct FindMyMouseSettings
|
||||||
{
|
{
|
||||||
FindMyMouseActivationMethod activationMethod = FIND_MY_MOUSE_DEFAULT_ACTIVATION_METHOD;
|
FindMyMouseActivationMethod activationMethod = FIND_MY_MOUSE_DEFAULT_ACTIVATION_METHOD;
|
||||||
|
bool includeWinKey = FIND_MY_MOUSE_DEFAULT_INCLUDE_WIN_KEY;
|
||||||
bool doNotActivateOnGameMode = FIND_MY_MOUSE_DEFAULT_DO_NOT_ACTIVATE_ON_GAME_MODE;
|
bool doNotActivateOnGameMode = FIND_MY_MOUSE_DEFAULT_DO_NOT_ACTIVATE_ON_GAME_MODE;
|
||||||
winrt::Windows::UI::Color backgroundColor = FIND_MY_MOUSE_DEFAULT_BACKGROUND_COLOR;
|
winrt::Windows::UI::Color backgroundColor = FIND_MY_MOUSE_DEFAULT_BACKGROUND_COLOR;
|
||||||
winrt::Windows::UI::Color spotlightColor = FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_COLOR;
|
winrt::Windows::UI::Color spotlightColor = FIND_MY_MOUSE_DEFAULT_SPOTLIGHT_COLOR;
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ namespace
|
|||||||
const wchar_t JSON_KEY_PROPERTIES[] = L"properties";
|
const wchar_t JSON_KEY_PROPERTIES[] = L"properties";
|
||||||
const wchar_t JSON_KEY_VALUE[] = L"value";
|
const wchar_t JSON_KEY_VALUE[] = L"value";
|
||||||
const wchar_t JSON_KEY_ACTIVATION_METHOD[] = L"activation_method";
|
const wchar_t JSON_KEY_ACTIVATION_METHOD[] = L"activation_method";
|
||||||
|
const wchar_t JSON_KEY_INCLUDE_WIN_KEY[] = L"include_win_key";
|
||||||
const wchar_t JSON_KEY_DO_NOT_ACTIVATE_ON_GAME_MODE[] = L"do_not_activate_on_game_mode";
|
const wchar_t JSON_KEY_DO_NOT_ACTIVATE_ON_GAME_MODE[] = L"do_not_activate_on_game_mode";
|
||||||
const wchar_t JSON_KEY_BACKGROUND_COLOR[] = L"background_color";
|
const wchar_t JSON_KEY_BACKGROUND_COLOR[] = L"background_color";
|
||||||
const wchar_t JSON_KEY_SPOTLIGHT_COLOR[] = L"spotlight_color";
|
const wchar_t JSON_KEY_SPOTLIGHT_COLOR[] = L"spotlight_color";
|
||||||
@@ -237,6 +238,15 @@ void FindMyMouse::parse_settings(PowerToysSettings::PowerToyValues& settings)
|
|||||||
Logger::warn("Failed to initialize Activation Method from settings. Will use default value");
|
Logger::warn("Failed to initialize Activation Method from settings. Will use default value");
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
auto jsonPropertiesObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_INCLUDE_WIN_KEY);
|
||||||
|
findMyMouseSettings.includeWinKey = jsonPropertiesObject.GetNamedBoolean(JSON_KEY_VALUE);
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
Logger::warn("Failed to get 'include windows key with ctrl' setting");
|
||||||
|
}
|
||||||
|
try
|
||||||
{
|
{
|
||||||
auto jsonPropertiesObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_DO_NOT_ACTIVATE_ON_GAME_MODE);
|
auto jsonPropertiesObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_DO_NOT_ACTIVATE_ON_GAME_MODE);
|
||||||
findMyMouseSettings.doNotActivateOnGameMode = jsonPropertiesObject.GetNamedBoolean(JSON_KEY_VALUE);
|
findMyMouseSettings.doNotActivateOnGameMode = jsonPropertiesObject.GetNamedBoolean(JSON_KEY_VALUE);
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||||||
[JsonPropertyName("activation_method")]
|
[JsonPropertyName("activation_method")]
|
||||||
public IntProperty ActivationMethod { get; set; }
|
public IntProperty ActivationMethod { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("include_win_key")]
|
||||||
|
public BoolProperty IncludeWinKey { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("activation_shortcut")]
|
[JsonPropertyName("activation_shortcut")]
|
||||||
public HotkeySettings ActivationShortcut { get; set; }
|
public HotkeySettings ActivationShortcut { get; set; }
|
||||||
|
|
||||||
@@ -54,6 +57,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||||||
public FindMyMouseProperties()
|
public FindMyMouseProperties()
|
||||||
{
|
{
|
||||||
ActivationMethod = new IntProperty(0);
|
ActivationMethod = new IntProperty(0);
|
||||||
|
IncludeWinKey = new BoolProperty(false);
|
||||||
ActivationShortcut = DefaultActivationShortcut;
|
ActivationShortcut = DefaultActivationShortcut;
|
||||||
DoNotActivateOnGameMode = new BoolProperty(true);
|
DoNotActivateOnGameMode = new BoolProperty(true);
|
||||||
BackgroundColor = new StringProperty("#000000");
|
BackgroundColor = new StringProperty("#000000");
|
||||||
|
|||||||
@@ -3,20 +3,20 @@
|
|||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Microsoft.UI.Xaml.Data;
|
using Microsoft.UI.Xaml.Data;
|
||||||
|
|
||||||
namespace Microsoft.PowerToys.Settings.UI.Converters
|
namespace Microsoft.PowerToys.Settings.UI.Converters
|
||||||
{
|
{
|
||||||
public sealed class FindMyMouseActivationIntToVisibilityConverter : IValueConverter
|
public sealed class IndexBitFieldToVisibilityConverter : IValueConverter
|
||||||
{
|
{
|
||||||
|
// Receives a hexadecimal bit mask as a parameter. Will check the value against that bitmask.
|
||||||
public object Convert(object value, Type targetType, object parameter, string language)
|
public object Convert(object value, Type targetType, object parameter, string language)
|
||||||
{
|
{
|
||||||
var selectedActivation = (int)value;
|
var currentIndexBit = 1 << (int)value;
|
||||||
var expectedActivation = int.Parse(parameter as string, CultureInfo.InvariantCulture);
|
var selectedIndicesBitField = System.Convert.ToUInt32(parameter as string, 16);
|
||||||
|
|
||||||
return selectedActivation == expectedActivation ? Visibility.Visible : Visibility.Collapsed;
|
return (selectedIndicesBitField & currentIndexBit) == 0 ? Visibility.Collapsed : Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
public object ConvertBack(object value, Type targetType, object parameter, string language)
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
AutomationProperties.LandmarkType="Main"
|
AutomationProperties.LandmarkType="Main"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Page.Resources>
|
<Page.Resources>
|
||||||
<converters:FindMyMouseActivationIntToVisibilityConverter x:Key="FindMyMouseActivationIntToVisibilityConverter" />
|
<converters:IndexBitFieldToVisibilityConverter x:Key="IndexBitFieldToVisibilityConverter" />
|
||||||
<tkconverters:BoolToVisibilityConverter
|
<tkconverters:BoolToVisibilityConverter
|
||||||
x:Key="BoolToInvertedVisibilityConverter"
|
x:Key="BoolToInvertedVisibilityConverter"
|
||||||
FalseValue="Visible"
|
FalseValue="Visible"
|
||||||
@@ -46,7 +46,12 @@
|
|||||||
<ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationCustomizedShortcut" />
|
<ComboBoxItem x:Uid="MouseUtils_FindMyMouse_ActivationCustomizedShortcut" />
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
<tkcontrols:SettingsExpander.Items>
|
<tkcontrols:SettingsExpander.Items>
|
||||||
<tkcontrols:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingMinimumDistance" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, Mode=OneWay, ConverterParameter=2}">
|
<tkcontrols:SettingsCard ContentAlignment="Left" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x3}">
|
||||||
|
<!-- Visible for both Press Left Control twice and Press Right Control twice activation methods -->
|
||||||
|
<CheckBox x:Uid="MouseUtils_Include_Win_Key" IsChecked="{x:Bind ViewModel.FindMyMouseIncludeWinKey, Mode=TwoWay}" />
|
||||||
|
</tkcontrols:SettingsCard>
|
||||||
|
<tkcontrols:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingMinimumDistance" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x4}">
|
||||||
|
<!-- Visible for the Shake Mouse activation method -->
|
||||||
<NumberBox
|
<NumberBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
LargeChange="1000"
|
LargeChange="1000"
|
||||||
@@ -56,7 +61,8 @@
|
|||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
Value="{x:Bind ViewModel.FindMyMouseShakingMinimumDistance, Mode=TwoWay}" />
|
Value="{x:Bind ViewModel.FindMyMouseShakingMinimumDistance, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
<tkcontrols:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingIntervalMs" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, Mode=OneWay, ConverterParameter=2}">
|
<tkcontrols:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingIntervalMs" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x4}">
|
||||||
|
<!-- Visible for the Shake Mouse activation method -->
|
||||||
<NumberBox
|
<NumberBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
LargeChange="1000"
|
LargeChange="1000"
|
||||||
@@ -66,7 +72,8 @@
|
|||||||
SpinButtonPlacementMode="Compact"
|
SpinButtonPlacementMode="Compact"
|
||||||
Value="{x:Bind ViewModel.FindMyMouseShakingIntervalMs, Mode=TwoWay}" />
|
Value="{x:Bind ViewModel.FindMyMouseShakingIntervalMs, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
<tkcontrols:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingFactor" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, Mode=OneWay, ConverterParameter=2}">
|
<tkcontrols:SettingsCard x:Uid="MouseUtils_FindMyMouse_ShakingFactor" Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x4}">
|
||||||
|
<!-- Visible for the Shake Mouse activation method -->
|
||||||
<NumberBox
|
<NumberBox
|
||||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||||
LargeChange="100"
|
LargeChange="100"
|
||||||
@@ -79,7 +86,8 @@
|
|||||||
<tkcontrols:SettingsCard
|
<tkcontrols:SettingsCard
|
||||||
x:Uid="MouseUtils_FindMyMouse_ActivationShortcut"
|
x:Uid="MouseUtils_FindMyMouse_ActivationShortcut"
|
||||||
HeaderIcon="{ui:FontIcon Glyph=}"
|
HeaderIcon="{ui:FontIcon Glyph=}"
|
||||||
Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource FindMyMouseActivationIntToVisibilityConverter}, Mode=OneWay, ConverterParameter=3}">
|
Visibility="{x:Bind ViewModel.FindMyMouseActivationMethod, Converter={StaticResource IndexBitFieldToVisibilityConverter}, Mode=OneWay, ConverterParameter=0x8}">
|
||||||
|
<!-- Visible for the Shortcut activation method -->
|
||||||
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.FindMyMouseActivationShortcut, Mode=TwoWay}" />
|
<controls:ShortcutControl MinWidth="{StaticResource SettingActionControlMinWidth}" HotkeySettings="{x:Bind Path=ViewModel.FindMyMouseActivationShortcut, Mode=TwoWay}" />
|
||||||
</tkcontrols:SettingsCard>
|
</tkcontrols:SettingsCard>
|
||||||
<tkcontrols:SettingsCard ContentAlignment="Left">
|
<tkcontrols:SettingsCard ContentAlignment="Left">
|
||||||
|
|||||||
@@ -2664,6 +2664,10 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
|
|||||||
<value>Shake mouse</value>
|
<value>Shake mouse</value>
|
||||||
<comment>Mouse is the hardware peripheral.</comment>
|
<comment>Mouse is the hardware peripheral.</comment>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="MouseUtils_Include_Win_Key.Content" xml:space="preserve">
|
||||||
|
<value>Only activate while holding the Windows key</value>
|
||||||
|
<comment>Specifies that the 'Find My Mouse' will only activate if the Windows key is held down while pressing the Ctrl key twice.</comment>
|
||||||
|
</data>
|
||||||
<data name="MouseUtils_FindMyMouse_ExcludedApps.Description" xml:space="preserve">
|
<data name="MouseUtils_FindMyMouse_ExcludedApps.Description" xml:space="preserve">
|
||||||
<value>Prevents module activation when an excluded application is the foreground application</value>
|
<value>Prevents module activation when an excluded application is the foreground application</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
|
|
||||||
FindMyMouseSettingsConfig = findMyMouseSettingsRepository.SettingsConfig;
|
FindMyMouseSettingsConfig = findMyMouseSettingsRepository.SettingsConfig;
|
||||||
_findMyMouseActivationMethod = FindMyMouseSettingsConfig.Properties.ActivationMethod.Value < 4 ? FindMyMouseSettingsConfig.Properties.ActivationMethod.Value : 0;
|
_findMyMouseActivationMethod = FindMyMouseSettingsConfig.Properties.ActivationMethod.Value < 4 ? FindMyMouseSettingsConfig.Properties.ActivationMethod.Value : 0;
|
||||||
|
_findMyMouseIncludeWinKey = FindMyMouseSettingsConfig.Properties.IncludeWinKey.Value;
|
||||||
_findMyMouseDoNotActivateOnGameMode = FindMyMouseSettingsConfig.Properties.DoNotActivateOnGameMode.Value;
|
_findMyMouseDoNotActivateOnGameMode = FindMyMouseSettingsConfig.Properties.DoNotActivateOnGameMode.Value;
|
||||||
|
|
||||||
string backgroundColor = FindMyMouseSettingsConfig.Properties.BackgroundColor.Value;
|
string backgroundColor = FindMyMouseSettingsConfig.Properties.BackgroundColor.Value;
|
||||||
@@ -210,6 +211,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool FindMyMouseIncludeWinKey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _findMyMouseIncludeWinKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_findMyMouseIncludeWinKey != value)
|
||||||
|
{
|
||||||
|
_findMyMouseIncludeWinKey = value;
|
||||||
|
FindMyMouseSettingsConfig.Properties.IncludeWinKey.Value = value;
|
||||||
|
NotifyFindMyMousePropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public HotkeySettings FindMyMouseActivationShortcut
|
public HotkeySettings FindMyMouseActivationShortcut
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -973,6 +992,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
private bool _findMyMouseEnabledStateIsGPOConfigured;
|
private bool _findMyMouseEnabledStateIsGPOConfigured;
|
||||||
private bool _isFindMyMouseEnabled;
|
private bool _isFindMyMouseEnabled;
|
||||||
private int _findMyMouseActivationMethod;
|
private int _findMyMouseActivationMethod;
|
||||||
|
private bool _findMyMouseIncludeWinKey;
|
||||||
private bool _findMyMouseDoNotActivateOnGameMode;
|
private bool _findMyMouseDoNotActivateOnGameMode;
|
||||||
private string _findMyMouseBackgroundColor;
|
private string _findMyMouseBackgroundColor;
|
||||||
private string _findMyMouseSpotlightColor;
|
private string _findMyMouseSpotlightColor;
|
||||||
|
|||||||
Reference in New Issue
Block a user