mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
add as much button support as we can to the RC71 (ROG Ally)
This commit is contained in:
555
app/Extra.Designer.cs
generated
555
app/Extra.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
25
app/Extra.cs
25
app/Extra.cs
@@ -90,6 +90,31 @@ namespace GHelper
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// Change text and hide irrelevant options on the ROG Ally,
|
||||||
|
// which is a bit of a special case piece of hardware.
|
||||||
|
if (AppConfig.ContainsModel("RC71"))
|
||||||
|
{
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
|
||||||
labelBindings.Text = Properties.Strings.KeyBindings;
|
labelBindings.Text = Properties.Strings.KeyBindings;
|
||||||
labelBacklightTitle.Text = Properties.Strings.LaptopBacklight;
|
labelBacklightTitle.Text = Properties.Strings.LaptopBacklight;
|
||||||
labelSettings.Text = Properties.Strings.Other;
|
labelSettings.Text = Properties.Strings.Other;
|
||||||
|
|||||||
@@ -427,6 +427,34 @@ namespace GHelper.Input
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void HandleEvent(int EventID)
|
static void HandleEvent(int EventID)
|
||||||
|
{
|
||||||
|
// The ROG Ally uses different M-key codes.
|
||||||
|
// We'll special-case the translation of those.
|
||||||
|
if (AppConfig.ContainsModel("RC71"))
|
||||||
|
{
|
||||||
|
switch(EventID)
|
||||||
|
{
|
||||||
|
|
||||||
|
// This is both the M1 and M2 keys.
|
||||||
|
// There's a way to differentiate, apparently, but it isn't over USB or any other obvious protocol.
|
||||||
|
case 165:
|
||||||
|
KeyProcess("m1");
|
||||||
|
return;
|
||||||
|
// The Command Center ("play-looking") button below the select key.
|
||||||
|
// We'll call this M3.
|
||||||
|
case 166:
|
||||||
|
KeyProcess("m3");
|
||||||
|
return;
|
||||||
|
// The M4/ROG key.
|
||||||
|
case 56:
|
||||||
|
KeyProcess("m4");
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// All other devices seem to use the same HID key-codes,
|
||||||
|
// so we can process them all the same.
|
||||||
|
else
|
||||||
{
|
{
|
||||||
switch (EventID)
|
switch (EventID)
|
||||||
{
|
{
|
||||||
@@ -468,6 +496,7 @@ namespace GHelper.Input
|
|||||||
NativeMethods.TurnOffScreen(Program.settingsForm.Handle);
|
NativeMethods.TurnOffScreen(Program.settingsForm.Handle);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!OptimizationService.IsRunning())
|
if (!OptimizationService.IsRunning())
|
||||||
HandleOptimizationEvent(EventID);
|
HandleOptimizationEvent(EventID);
|
||||||
|
|||||||
Reference in New Issue
Block a user