[Feature] Enable WinL as modifier for hotkey and make Ctrl+WinL the new default hotkey (#153), version 1.0.17.18

This commit is contained in:
Markus Hofknecht 2021-04-22 19:46:34 +02:00
parent ecebddb0cb
commit ceb55191f2
4 changed files with 6 additions and 16 deletions

View file

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.17.17")]
[assembly: AssemblyFileVersion("1.0.17.17")]
[assembly: AssemblyVersion("1.0.17.18")]
[assembly: AssemblyFileVersion("1.0.17.18")]

View file

@ -65,7 +65,7 @@ namespace SystemTrayMenu.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Ctrl+Alt+Apps")]
[global::System.Configuration.DefaultSettingValueAttribute("Ctrl+LWin")]
public string HotKey {
get {
return ((string)(this["HotKey"]));

View file

@ -12,14 +12,11 @@
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="HotKey" Provider="CustomSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">Ctrl+Alt+Apps</Value>
<Value Profile="(Default)">Ctrl+LWin</Value>
</Setting>
<Setting Name="IsUpgraded" Provider="CustomSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="HideTaskbarForm" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="OpenItemWithOneClick" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>

View file

@ -388,7 +388,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
if (NativeMethods.User32GetKeyNameText(numpad << 16, keyName, 100) > 0)
{
keyString = keyName.ToString().Replace("*", string.Empty, StringComparison.InvariantCulture).Trim().ToLowerInvariant();
if (keyString.IndexOf("(", StringComparison.Ordinal) >= 0)
if (keyString.Contains("("))
{
return "* " + keyString;
}
@ -401,7 +401,7 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
if (NativeMethods.User32GetKeyNameText(numpad << 16, keyName, 100) > 0)
{
keyString = keyName.ToString().Replace("*", string.Empty, StringComparison.InvariantCulture).Trim().ToLowerInvariant();
if (keyString.IndexOf("(", StringComparison.Ordinal) >= 0)
if (keyString.Contains("("))
{
return "/ " + keyString;
}
@ -527,13 +527,6 @@ namespace SystemTrayMenu.UserInterface.HotkeyTextboxControl
return;
}
// LWin/RWin doesn't work as hotkeys (neither do they work as modifier keys in .NET 2.0)
if (hotkey == Keys.LWin || hotkey == Keys.RWin)
{
Text = string.Empty;
return;
}
// Only validate input if it comes from the user
if (bCalledProgramatically == false)
{