Fix for (someitmes) not working hotkeys on Z13 https://github.com/seerge/g-helper/issues/1547

This commit is contained in:
Serge
2023-10-31 18:03:23 +01:00
parent 162514a8f9
commit f854c8e088
2 changed files with 4 additions and 13 deletions

View File

@@ -1,10 +1,7 @@
using GHelper.Gpu; using GHelper.Gpu;
using GHelper.Helpers; using GHelper.Helpers;
using HidLibrary;
using NAudio.Gui;
using System.Diagnostics;
using System.Drawing;
using System.Text; using System.Text;
using HidLibrary;
namespace GHelper namespace GHelper
{ {
@@ -281,18 +278,12 @@ namespace GHelper
{ {
input = device; input = device;
//Logger.WriteLine("HID Device("+ reportID + ")" + + device.Capabilities.FeatureReportByteLength + "|" + device.Capabilities.InputReportByteLength + device.DevicePath); //Logger.WriteLine("HID Device("+ reportID + ")" + + device.Capabilities.FeatureReportByteLength + "|" + device.Capabilities.InputReportByteLength + device.DevicePath);
if (reportID == INPUT_HID_ID && device.Attributes.ProductId == 0x1a30) return input;
} }
return input; return input;
} }
public static bool TouchpadToggle()
{
HidDevice? input = GetDevice();
if (input != null) return input.WriteFeatureData(new byte[] { INPUT_HID_ID, 0xf4, 0x6b });
return false;
}
public static byte[] AuraMessage(int mode, Color color, Color color2, int speed, bool mono = false) public static byte[] AuraMessage(int mode, Color color, Color color2, int speed, bool mono = false)
{ {
@@ -575,7 +566,7 @@ namespace GHelper
SetHeatmap(true); SetHeatmap(true);
timer.Enabled = true; timer.Enabled = true;
return; return;
} }
if (Mode == GPUMODE) if (Mode == GPUMODE)
{ {

View File

@@ -514,7 +514,7 @@ namespace GHelper.Input
Logger.WriteLine("Tablet: " + tabletState + " Touchpad: " + touchpadState); Logger.WriteLine("Tablet: " + tabletState + " Touchpad: " + touchpadState);
if (tabletState && touchpadState || !tabletState && !touchpadState) AsusUSB.TouchpadToggle(); if (tabletState && touchpadState || !tabletState && !touchpadState) ToggleTouchpad();
} }