mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
This commit is contained in:
@@ -35,8 +35,6 @@ namespace GHelper.Input
|
|||||||
Program.acpi.SubscribeToEvents(WatcherEventArrived);
|
Program.acpi.SubscribeToEvents(WatcherEventArrived);
|
||||||
//Task.Run(Program.acpi.RunListener);
|
//Task.Run(Program.acpi.RunListener);
|
||||||
|
|
||||||
if (AppConfig.ContainsModel("VivoBook")) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
|
|
||||||
|
|
||||||
hook.KeyPressed += new EventHandler<KeyPressedEventArgs>(KeyPressed);
|
hook.KeyPressed += new EventHandler<KeyPressedEventArgs>(KeyPressed);
|
||||||
|
|
||||||
RegisterKeys();
|
RegisterKeys();
|
||||||
@@ -86,6 +84,9 @@ namespace GHelper.Input
|
|||||||
Logger.WriteLine("Optimization service is running");
|
Logger.WriteLine("Optimization service is running");
|
||||||
|
|
||||||
InitBacklightTimer();
|
InitBacklightTimer();
|
||||||
|
|
||||||
|
if (AppConfig.ContainsModel("VivoBook")) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InitBacklightTimer()
|
public void InitBacklightTimer()
|
||||||
@@ -511,7 +512,7 @@ namespace GHelper.Input
|
|||||||
AppConfig.Set("fn_lock", fnLock);
|
AppConfig.Set("fn_lock", fnLock);
|
||||||
|
|
||||||
if (AppConfig.ContainsModel("VivoBook"))
|
if (AppConfig.ContainsModel("VivoBook"))
|
||||||
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock == 1 ? 0 : 1, "FnLock");
|
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock == 1 ? 1 : 0, "FnLock");
|
||||||
else
|
else
|
||||||
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user