mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Empty Default actions for CC / Padles on Ally
This commit is contained in:
@@ -262,7 +262,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool IsAlly()
|
public static bool IsAlly()
|
||||||
{
|
{
|
||||||
return ContainsModel("RC71");
|
return true || ContainsModel("RC71");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool NoMKeys()
|
public static bool NoMKeys()
|
||||||
@@ -305,7 +305,7 @@ public static class AppConfig
|
|||||||
|
|
||||||
public static bool IsStrix()
|
public static bool IsStrix()
|
||||||
{
|
{
|
||||||
return ContainsModel("Strix");
|
return ContainsModel("Strix") || ContainsModel("Scar");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool IsZ13()
|
public static bool IsZ13()
|
||||||
@@ -317,4 +317,9 @@ public static class AppConfig
|
|||||||
{
|
{
|
||||||
return ContainsModel("X16") || ContainsModel("X13");
|
return ContainsModel("X16") || ContainsModel("X13");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsAdvantageEdition()
|
||||||
|
{
|
||||||
|
return ContainsModel("13QY");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ public class AsusACPI
|
|||||||
public const int GPUModeStandard = 1;
|
public const int GPUModeStandard = 1;
|
||||||
public const int GPUModeUltimate = 2;
|
public const int GPUModeUltimate = 2;
|
||||||
|
|
||||||
public static int MaxTotal => AppConfig.ContainsModel("13QY") ? 250 : 150;
|
public static int MaxTotal => AppConfig.IsAdvantageEdition() ? 250 : 150;
|
||||||
public const int MinTotal = 5;
|
public const int MinTotal = 5;
|
||||||
public const int DefaultTotal = 125;
|
public const int DefaultTotal = 125;
|
||||||
|
|
||||||
|
|||||||
@@ -182,18 +182,18 @@ namespace GHelper
|
|||||||
_modes.Remove(3);
|
_modes.Remove(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.ContainsModel("401") || AppConfig.ContainsModel("X13"))
|
if (AppConfig.NoAuraColor())
|
||||||
{
|
{
|
||||||
_modes.Remove(2);
|
_modes.Remove(2);
|
||||||
_modes.Remove(3);
|
_modes.Remove(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.ContainsModel("G513QY"))
|
if (AppConfig.IsAdvantageEdition())
|
||||||
{
|
{
|
||||||
return _modes;
|
return _modes;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AppConfig.ContainsModel("Strix") || AppConfig.ContainsModel("Scar"))
|
if (AppConfig.IsStrix())
|
||||||
{
|
{
|
||||||
return _modesStrix;
|
return _modesStrix;
|
||||||
}
|
}
|
||||||
|
|||||||
83
app/Extra.cs
83
app/Extra.cs
@@ -13,9 +13,11 @@ namespace GHelper
|
|||||||
ScreenControl screenControl = new ScreenControl();
|
ScreenControl screenControl = new ScreenControl();
|
||||||
ClamshellModeControl clamshellControl = new ClamshellModeControl();
|
ClamshellModeControl clamshellControl = new ClamshellModeControl();
|
||||||
|
|
||||||
|
const string EMPTY = "--------------";
|
||||||
|
|
||||||
Dictionary<string, string> customActions = new Dictionary<string, string>
|
Dictionary<string, string> customActions = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{"","--------------" },
|
{"", EMPTY},
|
||||||
{"mute", Properties.Strings.VolumeMute},
|
{"mute", Properties.Strings.VolumeMute},
|
||||||
{"screenshot", Properties.Strings.PrintScreen},
|
{"screenshot", Properties.Strings.PrintScreen},
|
||||||
{"play", Properties.Strings.PlayPause},
|
{"play", Properties.Strings.PlayPause},
|
||||||
@@ -58,6 +60,12 @@ namespace GHelper
|
|||||||
customActions[""] = "Calculator";
|
customActions[""] = "Calculator";
|
||||||
customActions["ghelper"] = Properties.Strings.OpenGHelper;
|
customActions["ghelper"] = Properties.Strings.OpenGHelper;
|
||||||
break;
|
break;
|
||||||
|
case "paddle":
|
||||||
|
customActions[""] = EMPTY;
|
||||||
|
break;
|
||||||
|
case "cc":
|
||||||
|
customActions[""] = EMPTY;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
combo.DropDownStyle = ComboBoxStyle.DropDownList;
|
combo.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
@@ -128,32 +136,6 @@ namespace GHelper
|
|||||||
customActions.Add("screenpad_up", Properties.Strings.ScreenPadUp);
|
customActions.Add("screenpad_up", Properties.Strings.ScreenPadUp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Change text and hide irrelevant options on the ROG Ally,
|
|
||||||
// which is a bit of a special case piece of hardware.
|
|
||||||
if (AppConfig.IsAlly())
|
|
||||||
{
|
|
||||||
// The back paddles both seem to issue the same code;
|
|
||||||
// so we'll replace "M1/M2" with one field, for now.
|
|
||||||
// (Eventually, we should learn how Asus' software tells the difference.)
|
|
||||||
labelM1.Text = "Back Paddles";
|
|
||||||
labelM2.Visible = false;
|
|
||||||
comboM2.Visible = false;
|
|
||||||
textM2.Visible = false;
|
|
||||||
|
|
||||||
// Re-label M3 and M4 to match the front labels.
|
|
||||||
labelM3.Text = "Ctrl Center";
|
|
||||||
labelM4.Text = "ROG";
|
|
||||||
|
|
||||||
// Hide all of the FN options, as the Ally has no special keyboard FN key.
|
|
||||||
labelFNC.Visible = false;
|
|
||||||
comboFNC.Visible = false;
|
|
||||||
textFNC.Visible = false;
|
|
||||||
labelFNF4.Visible = false;
|
|
||||||
comboFNF4.Visible = false;
|
|
||||||
textFNF4.Visible = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppConfig.NoMKeys())
|
if (AppConfig.NoMKeys())
|
||||||
{
|
{
|
||||||
labelM1.Text = "FN+F2";
|
labelM1.Text = "FN+F2";
|
||||||
@@ -179,16 +161,45 @@ namespace GHelper
|
|||||||
checkUSBC.Visible = false;
|
checkUSBC.Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Change text and hide irrelevant options on the ROG Ally,
|
||||||
|
// which is a bit of a special case piece of hardware.
|
||||||
|
if (AppConfig.IsAlly())
|
||||||
|
{
|
||||||
|
labelM1.Visible = comboM1.Visible = textM1.Visible = false;
|
||||||
|
labelM2.Visible = comboM2.Visible = textM2.Visible = false;
|
||||||
|
|
||||||
|
// Re-label M3 and M4 and FNF4 to match the front labels.
|
||||||
|
labelM3.Text = "Ctrl Center";
|
||||||
|
labelM4.Text = "ROG";
|
||||||
|
labelFNF4.Text = "Back Paddles";
|
||||||
|
|
||||||
|
// Hide all of the FN options, as the Ally has no special keyboard FN key.
|
||||||
|
labelFNC.Visible = false;
|
||||||
|
comboFNC.Visible = false;
|
||||||
|
textFNC.Visible = false;
|
||||||
|
|
||||||
|
SetKeyCombo(comboM3, textM3, "cc");
|
||||||
|
SetKeyCombo(comboM4, textM4, "m4");
|
||||||
|
SetKeyCombo(comboFNF4, textFNF4, "paddle");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetKeyCombo(comboM1, textM1, "m1");
|
||||||
|
SetKeyCombo(comboM2, textM2, "m2");
|
||||||
|
|
||||||
|
SetKeyCombo(comboM3, textM3, "m3");
|
||||||
|
SetKeyCombo(comboM4, textM4, "m4");
|
||||||
|
SetKeyCombo(comboFNF4, textFNF4, "fnf4");
|
||||||
|
|
||||||
|
SetKeyCombo(comboFNC, textFNC, "fnc");
|
||||||
|
SetKeyCombo(comboFNE, textFNE, "fne");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
InitTheme();
|
InitTheme();
|
||||||
|
|
||||||
SetKeyCombo(comboM1, textM1, "m1");
|
|
||||||
SetKeyCombo(comboM2, textM2, "m2");
|
|
||||||
SetKeyCombo(comboM3, textM3, "m3");
|
|
||||||
SetKeyCombo(comboM4, textM4, "m4");
|
|
||||||
SetKeyCombo(comboFNF4, textFNF4, "fnf4");
|
|
||||||
SetKeyCombo(comboFNC, textFNC, "fnc");
|
|
||||||
SetKeyCombo(comboFNE, textFNE, "fne");
|
|
||||||
|
|
||||||
Shown += Keyboard_Shown;
|
Shown += Keyboard_Shown;
|
||||||
|
|
||||||
comboKeyboardSpeed.DropDownStyle = ComboBoxStyle.DropDownList;
|
comboKeyboardSpeed.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
|
|||||||
Reference in New Issue
Block a user