twinkle-tray icon indicating copy to clipboard operation
twinkle-tray copied to clipboard

[Requests] Change monitor brightness when system brightness changed using WmiMonitorBrightnessEvent API

Open eiarhabi opened this issue 1 year ago • 7 comments

This issue extends upon #291.

Instead of directly hooking brightness keys, it seems much easier if we can adjust monitor brightness to values read from WMI whenever there's a change in monitor brightness. See here and here for some API documentations and a sample code from StackOverflow for asynchronously getting brightness change events.

eiarhabi avatar Mar 27 '23 08:03 eiarhabi

Wmi brightness functions only work with laptop-displays, external monitors are totally ignored,

vrjohannes avatar Mar 27 '23 14:03 vrjohannes

Thanks for the links! Unfortunately, the samples aren't in C++, which is a requirement. C# or VB won't work for Twinkle Tray. I'll look around a bit more to see if I can find a C++ example for WMI events.

xanderfrangos avatar Mar 27 '23 15:03 xanderfrangos

Thanks for the links! Unfortunately, the samples aren't in C++, which is a requirement. C# or VB won't work for Twinkle Tray. I'll look around a bit more to see if I can find a C++ example for WMI events.

https://stackoverflow.com/questions/21476512/get-system-brightness-event-in-windows Here's a C++ example.

eiarhabi avatar Mar 28 '23 19:03 eiarhabi

Dropping by to see if the suggested feature is planned for implementation. Any good news hopefully?

cerahmed avatar Jul 31 '23 00:07 cerahmed

Dropping by to see if the suggested feature is planned for implementation. Any good news hopefully?

Hoping the same thing! Has this possibly been looked at for the current beta branch?

I can't currently find a way to change my Keychron Q1 HE to ouput the Screen Brightness Down (KC_BRID) and Screen Brightness Up (KC_BRIU) to control my monitors (PG27AQN, VG27AQ, and VN248). This feature would be amazing for use in conjunction with GMK.

(Note: GMK keycodes are listed in bold)

P.S. As someone not super knowledgeable on compsci I'll take this chance to ask since it was somewhat mentioned in the issue starter since it's tangentially related: do you need to have WMIC or WMI-Bridge on in order to properly take advantage of this feature (if it is or once it is implemented that is)? I ask since the starter mentions "adjust[ing] monitor brightness to values read from WMI whenever there's a change in monitor brightness".

MF-JEWM avatar Jul 24 '24 01:07 MF-JEWM

I'd love to see this be added, allowing the system brightness to control monitors, basically the same way it works on a laptop. It would also allow Windows to automatically manage the brightness before falling asleep/turning off the screen.

superluig164 avatar Aug 16 '24 11:08 superluig164