Fn-lock support for optimization service

This commit is contained in:
Serge
2023-06-01 14:32:29 +02:00
parent 1603f625ed
commit f0ee2b8aac
2 changed files with 2 additions and 3 deletions

View File

@@ -137,7 +137,6 @@ namespace GHelper
string actionM1 = AppConfig.getConfigString("m1");
string actionM2 = AppConfig.getConfigString("m2");
if (keyProfile != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyProfile);
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);
@@ -148,7 +147,7 @@ namespace GHelper
// FN-Lock group
if (AppConfig.isConfig("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
for (Keys i = Keys.F1; i < Keys.F12; i++) hook.RegisterHotKey(ModifierKeys.None, i);
for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i);
}

View File

@@ -105,7 +105,7 @@ public sealed class KeyboardHook : IDisposable
// register the hot key.
if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
throw new InvalidOperationException("Couldnt register the hot key.");
Logger.WriteLine("Couldnt register " + key);
}
/// <summary>