From 1b25017c1882bed419a66b0dea7478c987d1a160 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Sat, 20 Jan 2024 12:46:35 +0100 Subject: [PATCH] Ally bindings --- app/Ally/AllyControl.cs | 64 ++++++++++++++++---------- app/Properties/Resources.Designer.cs | 10 ++++ app/Properties/Resources.resx | 7 ++- app/Resources/icons8-animation-32.png | Bin 0 -> 297 bytes app/Settings.Designer.cs | 46 +++++++++--------- 5 files changed, 77 insertions(+), 50 deletions(-) create mode 100644 app/Resources/icons8-animation-32.png diff --git a/app/Ally/AllyControl.cs b/app/Ally/AllyControl.cs index c7457db5..88e11b8f 100644 --- a/app/Ally/AllyControl.cs +++ b/app/Ally/AllyControl.cs @@ -3,7 +3,6 @@ using GHelper.Input; using GHelper.USB; using HidSharp; using System.Text; -using System.Windows.Forms; namespace GHelper.Ally { @@ -61,6 +60,8 @@ namespace GHelper.Ally public const string BindM2 = "02-8E"; public const string BindLT = "01-0D"; public const string BindRT = "01-0E"; + public const string BindXB = "01-13"; + public const string BindMouseL = "03-01"; public const string BindMouseR = "03-02"; @@ -79,6 +80,7 @@ namespace GHelper.Ally public const string BindShift = "02-88"; public const string BindCtrl = "02-8C"; + public const string BindAlt = "02-8A"; public const string BindTaskManager = "04-03-8C-88-76"; public const string BindCloseWindow = "04-02-8A-0C"; @@ -87,8 +89,14 @@ namespace GHelper.Ally public const string BindBrightnessUp = "04-04-8C-88-8A-06"; public const string BindOverlay = "04-03-8C-88-44"; - public const string BindShiftTab = "04-02-88-0D"; + public const string BindShiftTab = "04-02-88-0D"; + public const string BindAltTab = "04-02-8A-0D"; + + public const string BindVolUp = "05-03"; + public const string BindVolDown = "05-02"; + + public const string BindPrintScrn = "02-C3"; static byte[] CommandReady = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0a, 0x01 }; static byte[] CommandSave = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x0f, 0x20 }; @@ -122,9 +130,35 @@ namespace GHelper.Ally { BindVB, "View Button" }, { BindMB, "Menu Button" }, - { "01-13", "XBox/Steam" }, + { BindXB, "XBox/Steam" }, + { BindVolUp, "Vol Up" }, + { BindVolDown, "Vol Down" }, + { BindBrightnessUp, "Bright Up" }, + { BindBrightnessDown, "Bright Down" }, + + { BindOverlay, "AMD Overlay" }, + { BindTaskManager, "Task Manager" }, + { BindCloseWindow, "Close Window" }, + { BindShiftTab, "Shift-Tab" }, + { BindAltTab, "Alt-Tab" }, + + { BindPrintScrn, "PrntScn" }, { BindEsc, "Esc" }, + { BindBack, "Backspace" }, + { BindTab, "Tab" }, + { BindEnter, "Enter" }, + { BindShift, "LShift" }, + { BindAlt, "LAlt" }, + { BindCtrl, "LCtl" }, + + { BindPgU, "PgUp" }, + { BindPgD, "PgDwn" }, + { BindKBU, "UpArrow" }, + { BindKBD, "DownArrow" }, + { BindKBL, "LeftArrow" }, + { BindKBR, "RightArrow" }, + { "02-05", "F1" }, { "02-06", "F2" }, { "02-04", "F3" }, @@ -150,8 +184,6 @@ namespace GHelper.Ally { "02-45", "0" }, { "02-4E", "-" }, { "02-55", "=" }, - { BindBack, "Backspace" }, - { BindTab, "Tab" }, { "02-15", "Q" }, { "02-1D", "W" }, { "02-24", "E" }, @@ -176,8 +208,6 @@ namespace GHelper.Ally { "02-4B", "l" }, { "02-4C", ";" }, { "02-52", "'" }, - { BindEnter, "Enter" }, - { BindShift, "LShift" }, { "02-22", "X" }, { "02-1A", "Z" }, { "02-21", "C" }, @@ -188,25 +218,16 @@ namespace GHelper.Ally { "02-41", "," }, { "02-49", "." }, { "02-89", "RShift" }, - { BindCtrl, "LCtl" }, { "02-82", "Meta" }, - { "02-8A", "LAlt" }, { "02-29", "Space" }, { "02-8B", "RAlt" }, { "02-84", "App menu" }, { "02-8D", "RCtl" }, - { "02-C3", "PrntScn" }, { "02-7E", "ScrLk" }, { "02-C2", "Insert" }, - { BindPgU, "PgUp" }, - { BindPgD, "PgDwn" }, { "02-C0", "Delete" }, { "02-94", "Home" }, { "02-95", "End" }, - { BindKBU, "UpArrow" }, - { BindKBD, "DownArrow" }, - { BindKBL, "LeftArrow" }, - { BindKBR, "RightArrow" }, { "02-77", "NumLock" }, { "02-90", "NumSlash" }, { "02-7C", "NumStar" }, @@ -231,20 +252,12 @@ namespace GHelper.Ally { "03-04", "Mouse scroll up" }, { "03-05", "Mouse scroll down" }, - { BindTaskManager, "Task Manager" }, - { BindCloseWindow, "Close Window" }, - { BindShiftTab, "Shift-Tab" }, - { "05-16", "Screenshot" }, { "05-19", "Show keyboard" }, { "05-1C", "Show desktop" }, { "05-1E", "Begin recording" }, { "05-01", "Mic off" }, - { "05-03", "Vol Up" }, - { "05-02", "Vol Down" }, - { BindBrightnessUp, "Bright Up" }, - { BindBrightnessDown, "Bright Down" } }; public AllyControl(SettingsForm settingsForm) @@ -337,7 +350,8 @@ namespace GHelper.Ally try { bytes = AppConfig.StringToBytes(binding); - } catch + } + catch { return new byte[2]; } diff --git a/app/Properties/Resources.Designer.cs b/app/Properties/Resources.Designer.cs index a8811e09..4f8bb67f 100644 --- a/app/Properties/Resources.Designer.cs +++ b/app/Properties/Resources.Designer.cs @@ -160,6 +160,16 @@ namespace GHelper.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap icons8_animation_32 { + get { + object obj = ResourceManager.GetObject("icons8-animation-32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/app/Properties/Resources.resx b/app/Properties/Resources.resx index 2ed46cbb..fc984650 100644 --- a/app/Properties/Resources.resx +++ b/app/Properties/Resources.resx @@ -238,6 +238,9 @@ ..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -313,7 +316,7 @@ ..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\icons8-animation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/app/Resources/icons8-animation-32.png b/app/Resources/icons8-animation-32.png new file mode 100644 index 0000000000000000000000000000000000000000..4392cc4abd9cc2ad0f8151b0a9aaed89a94298b6 GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz&H|6fVg?3oVGw3ym^DWND0th` z#WAE}&fDpGIS(5MxXD+reOKgG@n)HHY_3?>Yn=)5+u3-huo^jt1q2AJ*uc#8+s{$& z%fUveyS61(wH#rKbT2T53Fro7GFlzbezbsfL)Rn!1%8|pT(>c7cqDd*QGLgp#PhnW z4Z%JqtXUiSKSup<`06lO=)foUn@kOBSgQ|kJo=KI5XP{9*{+Mzl7I46=H!{&2~+s2 zPKCRAuWe