mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Zenbook fn-lock https://github.com/seerge/g-helper/issues/2154
This commit is contained in:
@@ -365,9 +365,9 @@ public static class AppConfig
|
||||
return ContainsModel("ProArt");
|
||||
}
|
||||
|
||||
public static bool IsVivobook()
|
||||
public static bool IsVivoZenbook()
|
||||
{
|
||||
return ContainsModel("Vivobook");
|
||||
return ContainsModel("Vivobook") || ContainsModel("Zenbook");
|
||||
}
|
||||
|
||||
// Devices with bugged bios command to change brightness
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace GHelper.Input
|
||||
|
||||
InitBacklightTimer();
|
||||
|
||||
if (AppConfig.ContainsModel("VivoBook")) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
|
||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.FnLock, AppConfig.Is("fn_lock") ? 1 : 0, "FnLock");
|
||||
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace GHelper.Input
|
||||
|
||||
// FN-Lock group
|
||||
|
||||
if (AppConfig.Is("fn_lock") && !AppConfig.ContainsModel("VivoBook"))
|
||||
if (AppConfig.Is("fn_lock") && !AppConfig.IsVivoZenbook())
|
||||
for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i);
|
||||
|
||||
// Arrow-lock group
|
||||
@@ -500,7 +500,7 @@ namespace GHelper.Input
|
||||
case "micmute":
|
||||
bool muteStatus = Audio.ToggleMute();
|
||||
Program.toast.RunToast(muteStatus ? "Muted" : "Unmuted", muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone);
|
||||
if (AppConfig.IsVivobook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||
if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed");
|
||||
break;
|
||||
case "brightness_up":
|
||||
SetBrightness(+10);
|
||||
@@ -568,7 +568,7 @@ namespace GHelper.Input
|
||||
int fnLock = AppConfig.Is("fn_lock") ? 0 : 1;
|
||||
AppConfig.Set("fn_lock", fnLock);
|
||||
|
||||
if (AppConfig.ContainsModel("VivoBook"))
|
||||
if (AppConfig.IsVivoZenbook())
|
||||
Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock == 1 ? 1 : 0, "FnLock");
|
||||
else
|
||||
Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys);
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace GHelper.USB
|
||||
public static Color Color1 = Color.White;
|
||||
public static Color Color2 = Color.Black;
|
||||
|
||||
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivobook() || AppConfig.IsProArt();
|
||||
static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivoZenbook() || AppConfig.IsProArt();
|
||||
static bool isStrix = AppConfig.IsStrix() && !AppConfig.IsNoDirectRGB();
|
||||
|
||||
static bool isStrix4Zone = AppConfig.IsStrixLimitedRGB();
|
||||
|
||||
Reference in New Issue
Block a user