From af9d3eb50e6332fc9ee6f5f6ec53aae60d727c8d Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 10 Feb 2024 22:53:22 +0100 Subject: [PATCH] Skip airplane mode command for ancient devices https://github.com/seerge/g-helper/issues/2052 --- app/AppConfig.cs | 5 +++++ app/Input/InputDispatcher.cs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/AppConfig.cs b/app/AppConfig.cs index bb148661d..fe5d9de15 100644 --- a/app/AppConfig.cs +++ b/app/AppConfig.cs @@ -387,6 +387,11 @@ public static bool IsStrixLimitedRGB() return (ContainsModel("G614JV") || ContainsModel("G614JZ") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G513QM") || ContainsModel("G531G")) && !Is("per_key_rgb"); } + public static bool IsNoAirplaneMode() + { + return ContainsModel("FX506"); + } + public static bool IsNoDirectRGB() { return ContainsModel("GA503") || ContainsModel("G533Q"); diff --git a/app/Input/InputDispatcher.cs b/app/Input/InputDispatcher.cs index eac355306..e1bb2835b 100644 --- a/app/Input/InputDispatcher.cs +++ b/app/Input/InputDispatcher.cs @@ -638,7 +638,7 @@ static void HandleEvent(int EventID) KeyProcess("m6"); return; case 136: // FN + F12 - Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Airplane, "Airplane"); + if (!AppConfig.IsNoAirplaneMode()) Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Airplane, "Airplane"); return; case 181: // FN + Numpad Enter KeyProcess("fne");