Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard backlight #35

Open
otaj opened this issue Jul 28, 2023 · 7 comments
Open

Keyboard backlight #35

otaj opened this issue Jul 28, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@otaj
Copy link

otaj commented Jul 28, 2023

Hi, it would be a great improvement, if swayosd-libinput-backend could also listen to keyboard backlight and show an OSD window.

Thank you for the great project!

@ErikReider ErikReider added the enhancement New feature or request label Jul 28, 2023
@ErikReider
Copy link
Owner

I've actually tested this on my Thinkpad but it doesn't seem to register... Are you able to use the XF86KbdBrightnessUp in a bind in Sway or any other compositor?

@otaj
Copy link
Author

otaj commented Aug 7, 2023

Hi, sorry, was on a vacation for a week. I'm using sway, but I have not set up a XF86KbdBrightnessUp keybind, and keyboard brightness "just works" out of the box. I'm also on a Thinkpad (T14 Gen2), I'm thinking it has be some sort of shenanigans from either libinput or some thinkpad driver.

Interestingly enough, when trying to capture keycodes using wev, my keyboard backlight switch (Fn + Space as printed on the keyboard) does not register at all.

@ErikReider
Copy link
Owner

I'm using sway, but I have not set up a XF86KbdBrightnessUp keybind, and keyboard brightness "just works" out of the box

my keyboard backlight switch (Fn + Space as printed on the keyboard) does not register at all

Exactly what I was trying to articulate above :)

Not sure how to get it working. Gnome seems to somehow get the key events so I'm not sure how this would be done...

Any ideas? :)

@otaj
Copy link
Author

otaj commented Aug 7, 2023

It seems to be kernel module. My personal laptop is Dell, with Fn+F5 combo for keyboard backlight, which also does not get registered in wev, however the files exposed in /sys/class/leds are generated by dell-laptop kernel module.

So, I guess hooking into kernel modules sounds like very much out of scope for this project. 😆

@ErikReider
Copy link
Owner

It seems to be kernel module. My personal laptop is Dell, with Fn+F5 combo for keyboard backlight, which also does not get registered in wev, however the files exposed in /sys/class/leds are generated by dell-laptop kernel module.

So, I guess hooking into kernel modules sounds like very much out of scope for this project. laughing

Good to know! Thanks for looking into it! Seems a bit too complicated so might look into how Gnome does it and get some "inspiration" :)

@otaj
Copy link
Author

otaj commented Nov 27, 2023

Hi, just checking in, I just found out that at least on my personal laptop (Dell), the information of changing keyboard backlight is relayed through /sys/class/leds/dell::kbd_backlight/brightness_hw_changed. If I setup inotify watch on this file, whenever I change keyboard backlight, this file gets modified. That might help :)

@ErikReider
Copy link
Owner

Hi, just checking in, I just found out that at least on my personal laptop (Dell), the information of changing keyboard backlight is relayed through /sys/class/leds/dell::kbd_backlight/brightness_hw_changed. If I setup inotify watch on this file, whenever I change keyboard backlight, this file gets modified. That might help :)

Oh, that's a really good find! I'll look into it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants