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

[Request] Use Windows brightness keys

Open LazieKat opened this issue 3 years ago • 11 comments

Hi,

I am using a Logitech MX Keys keyboard with function keys for brightness, I tried registering fn+f1 and fn+f2 in twinkle tray hotkeys but it doesn't work. So I'm using a batch file in my Logitech Options app but it is far from practical.

The hotkey feature is fantastic, but it doesn't provide extra usability when my keyboard already has dedicated brightness keys. It would be nice if we could register one screen as the default brightness-controllable screen by Window, and then Windows can use the API twinkle tray is providing to control the brightness. The experience that way will be system native with twinkle tray acting more as a driver or a service than an application.

Thank you so much for your work.

LazieKat avatar Dec 11 '21 17:12 LazieKat

This would be a godsend. The brightness keys on my Keychron K2 bring up the Windows native brightness pop-up, which obviously does nothing. Would be pretty cool to be able to use these dedicated keys to do what they were always meant to do.

hensez avatar Dec 18 '21 09:12 hensez

+1, that would be so nice to use the function keys of my MX Keys with Twinkle Tray.

ghost avatar Dec 18 '21 16:12 ghost

Same here. Windows built-in brightness is basically useless at this point, and it makes sense to "recycle" the functionality of those shortcuts.

LupusHacker avatar Dec 21 '21 04:12 LupusHacker

Can't you use sharpkeys to rebind those keys to random ones that are not on your keyboard (I use f18-f20) and then just hotkey the rebound keys in twinkle?

I can't imagine such a solution will work for every brightness key combo. That said, as long your brightness keys use standard windows scancodes it should work... I think?

sos-michael avatar Dec 29 '21 01:12 sos-michael

Interesting solution. I just tried it tho and to curb my excitement my keyboard seems to not use standard scancodes and SharpKeys didn't detect their clicks.

Using Twinkle Tray as a driver should theoretically be a universal solution.

LazieKat avatar Dec 30 '21 18:12 LazieKat

That stinks!

A broader question that we'd need to answer (for a universal solution): If your keyboard doesn't use standard scancodes for fn-keys how is twinkle-tray (or any other software really) supposed to detect it?

I only use TT as a replacement to my laptop's brightness control software, so I'm interested as well. I just don't really know how this would work. Would a bespoke solution be needed for each device OEM? Seems like a tall order...

I guess I just lucked out and didn't even realize.

sos-michael avatar Dec 30 '21 21:12 sos-michael

Hey all, I'm not aware of any third party software that can detect hardware brightness keys. Brightness keys are almost never reported to Windows as normal keyboard keys. Because of this, there's no way to reliably detect when the keys are pressed. I know that Logitech has software for remapping keys on their own keyboards, but no such software exists for OEM keyboards.

Twinkle Tray will never support this feature directly. Sorry guys.

xanderfrangos avatar Dec 30 '21 21:12 xanderfrangos

Brightness keys are almost never reported to Windows

Wait- then when are they actually detected? Would the key need to be a separate bind that's not a second layer of an fn key?

LupusHacker avatar Jan 04 '22 14:01 LupusHacker

@LupusHacker I have a Logitech keyboard with rebindable function keys via software. That's what I'm referring to. To clarify, I'm not aware of any OEM brightness keys that are rebindable or broadcast in Windows as a normal key.

xanderfrangos avatar Jan 04 '22 15:01 xanderfrangos

@LupusHacker I have a Logitech keyboard with rebindable function keys via software. That's what I'm referring to. To clarify, I'm not aware of any OEM brightness keys that are rebindable or broadcast in Windows as a normal key.

Would it be possible to periodically query the system brightness level and adjust twinkle-tray to the same level?

doughn0 avatar Jan 31 '22 09:01 doughn0

MX user here, mapping the same keyboard shortcuts works for me (and could work for those who have keyboards with configurable options for FN keys) image

bariscc avatar Jun 22 '22 06:06 bariscc

MX user here, mapping the same keyboard shortcuts works for me (and could work for those who have keyboards with configurable options for FN keys) image

This worked for me! Thanks for your suggestion!

grantfitzsimmons avatar Nov 22 '22 00:11 grantfitzsimmons

@LupusHacker I have a Logitech keyboard with rebindable function keys via software. That's what I'm referring to. To clarify, I'm not aware of any OEM brightness keys that are rebindable or broadcast in Windows as a normal key.

Would it be possible to periodically query the system brightness level and adjust twinkle-tray to the same level?

This could be be an interesting alternative.

Zebrazilla avatar Nov 23 '22 04:11 Zebrazilla