aredden / electron-G14Control

Electron desktop application replacement for G14ControlR3.
MIT License
209 stars 27 forks source link

Some kind of API or external control? #74

Open Nixellion opened 2 years ago

Nixellion commented 2 years ago

Hi!

Is there some kind of way to externally interact with G14Control from another app?

In my quest to repurpose fan profile and ROG buttons on my G733 I managed to write a Python script that can detect those keypresses using pywinusb. I'd like to bind fan profile button to toggling G14Control power and fan profiles.

Is there some kind of way of doing it? However hacky

aredden commented 2 years ago

Well you can check out https://github.com/aredden/electron-G14Control/blob/bf367805f7755d1a15a059f6805b1e84e750c87a/electron/src/IPCEvents/HID/HIDDevice.ts#L204-L223 which is what I use to set up the keyboard listeners. You can't do it with a normal keyboard hook, but if you can find the HID device that emits an event when one of those rog keys is pressed then you can create a listener for it. (I've noticed the the mapped HID vendor id / event keycode / etc can be different for different rog laptops)