seerge / g-helper

Lightweight Armoury Crate alternative for Asus laptops and ROG Ally. Control tool for ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar and other models
https://g-helper.com
GNU General Public License v3.0
7.84k stars 273 forks source link

Support auto keyboard backlight based on light sensor #3363

Open yinyue200 opened 2 weeks ago

yinyue200 commented 2 weeks ago

Rules

Is your feature request related to a problem? Please describe

The keyboard backlight can be automatically turned on or off when the ambient light is bright

Describe the solution you'd like

follow to similar logic https://github.com/danieleds/Asus-Zenbook-Ambient-Light-Sensor-Controller maybe we can use cswinrt lib for "Windows.Devices.Sensors" to access light sensor.

Describe alternatives you've considered

No response

Device and Model

Zenbook

Additional information.

No response

seerge commented 2 weeks ago

@yinyue200 hello,

That's interesting idea, but honestly, I have don't know how to read backlight sensor data as my device(s) don't even have it. I see that the linux tool you linked seem to read it from /sys/bus/acpi/devices/ACPI0008:00/ali

https://github.com/danieleds/Asus-Zenbook-Ambient-Light-Sensor-Controller/blob/2b9a795e3cf6d1e0665e63e6bb47394e0b1fa43c/service/main.cpp#L205

I'm not sure what would be an equivalent in windows. Since you have a sensor, may be you can experiment and check if it returns something by doing it a way app currently accesses ATKACPI driver ? https://github.com/seerge/g-helper/blob/c2c5d2a0c543cc9269babdaec97721c06a7452f7/app/AsusACPI.cs#L333