mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Fn-lock support for optimization service
This commit is contained in:
@@ -137,7 +137,6 @@ namespace GHelper
|
|||||||
string actionM1 = AppConfig.getConfigString("m1");
|
string actionM1 = AppConfig.getConfigString("m1");
|
||||||
string actionM2 = AppConfig.getConfigString("m2");
|
string actionM2 = AppConfig.getConfigString("m2");
|
||||||
|
|
||||||
|
|
||||||
if (keyProfile != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyProfile);
|
if (keyProfile != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyProfile);
|
||||||
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);
|
if (keyApp != Keys.None) hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control, keyApp);
|
||||||
|
|
||||||
@@ -148,7 +147,7 @@ namespace GHelper
|
|||||||
// FN-Lock group
|
// FN-Lock group
|
||||||
|
|
||||||
if (AppConfig.isConfig("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public sealed class KeyboardHook : IDisposable
|
|||||||
|
|
||||||
// register the hot key.
|
// register the hot key.
|
||||||
if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
|
if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key))
|
||||||
throw new InvalidOperationException("Couldn’t register the hot key.");
|
Logger.WriteLine("Couldn’t register " + key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user