mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-02 02:24:38 +12:00
[BUG] displays the error message "Couldn't register the hotkey" at launch (#102)
* When setting 'Page down' as hotkey, the app crashes.
This commit is contained in:
parent
d819e80f9f
commit
bff0f3563b
|
@ -35,5 +35,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("0.11.1.7")]
|
||||
[assembly: AssemblyFileVersion("0.11.1.7")]
|
||||
[assembly: AssemblyVersion("0.11.1.8")]
|
||||
[assembly: AssemblyFileVersion("0.11.1.8")]
|
||||
|
|
|
@ -450,7 +450,16 @@ namespace SystemTrayMenu.UserInterface.Controls
|
|||
{
|
||||
hotkey = hotkey.Remove(0, hotkey.LastIndexOf('+') + 1).Trim();
|
||||
}
|
||||
key = (Keys)Enum.Parse(typeof(Keys), hotkey);
|
||||
try
|
||||
{
|
||||
hotkey = hotkey.Replace("PgDn", "PageDown").
|
||||
Replace("PgUp", "PageUp");
|
||||
key = (Keys)Enum.Parse(typeof(Keys), hotkey);
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
Log.Warn($"{hotkey} can not be parsed", ex);
|
||||
}
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue