mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
XGM binding for Ally https://github.com/seerge/g-helper/issues/1964
This commit is contained in:
@@ -145,6 +145,7 @@ namespace GHelper.Input
|
||||
{
|
||||
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F1);
|
||||
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F2);
|
||||
hook.RegisterHotKey(ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt, Keys.F3);
|
||||
}
|
||||
|
||||
// FN-Lock group
|
||||
@@ -370,6 +371,9 @@ namespace GHelper.Input
|
||||
case Keys.F2:
|
||||
SetBrightness(10);
|
||||
break;
|
||||
case Keys.F3:
|
||||
Program.settingsForm.gpuControl.ToggleXGM();
|
||||
break;
|
||||
case Keys.F14:
|
||||
Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeEco);
|
||||
break;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using HidSharp;
|
||||
using GHelper.USB;
|
||||
using GHelper.Ally;
|
||||
using GHelper.USB;
|
||||
using HidSharp;
|
||||
using System.Text;
|
||||
|
||||
namespace GHelper.Input
|
||||
{
|
||||
@@ -16,17 +16,17 @@ namespace GHelper.Input
|
||||
var task = Task.Run(Listen);
|
||||
}
|
||||
|
||||
private void Listen () {
|
||||
private void Listen()
|
||||
{
|
||||
|
||||
HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
|
||||
|
||||
// Fallback
|
||||
int count = 0;
|
||||
|
||||
while (input == null && count++ < 5)
|
||||
while (input == null && count++ < 10)
|
||||
{
|
||||
Aura.Init();
|
||||
Thread.Sleep(2000);
|
||||
Thread.Sleep(1000);
|
||||
input = AsusHid.FindHidStream(AsusHid.INPUT_ID);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace GHelper.Input
|
||||
return;
|
||||
}
|
||||
|
||||
AsusHid.WriteInput(Encoding.ASCII.GetBytes("ZASUS Tech.Inc."));
|
||||
Logger.WriteLine($"Input: {input.Device.DevicePath}");
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user