Talk:Hyprland

From ArchWiki
Latest comment: 8 January by Ja.koolit in topic Hardware keyboard binds

Hardware keyboard binds

@Ja.koolit Its interesting to me that your hardware keyboard brightness keys do not work OOTB, on my laptop the hardware keys appear to be hardcoded to the backlight function, the Xf86 keysyms you added do not work for me at all which is why, if you noticed, I had my brightness script bound to Super+F2/F3, even with the keysyms bound using Fn+F2/F3 overrides everything and just lowers/raises the backlight without firing the notifications. Screen brightness using FN works perfectly and fires the script as expected. I had thought this was common across all laptops because it makes sense it would be that way, without it you wouldn't be able to change brightness unless the OS was running and, for example I can boot to a zsh TTY without ever loading Hyprland at all and still turn my keyboard backlight up or down. I think we need to address this on the page somehow as for some users the current instructions would result in a non expected result. Calling @Erus Iluvatar to the convo too, any suggestions on how to make this clear to users? Dungeonseeker (talk) 13:22, 6 January 2024 (UTC)Reply[reply]

I have no direct experience on this (I have no hardware with a backlit keyboard), but from what I remember seeing on various laptop pages, it depends on the specific hardware and two broad categories exist:
  • either the backlight is fully handled by the laptop firmware and the OS sees nothing happening (e.g. HP EliteBook 745 G4#Function keys),
  • or the keybind has to be handled by the OS.
In that second scenario, we have two possibilities:
I'm not sure where @Dungeonseeker's setup fits in all that: either in the fully managed in firmware camp, but I thought no keys would be seen by wev at all, or in the "raw key sequence is left for the OS" side, but I thought it would not work in a TTY sooo…
Maybe we could reword all or part of this as an introduction to Keyboard backlight :D
IMO for this page the best option would be using a pseudo-variable in the code sample and explaining under it that it has to be adapted per-user depending on their hardware.
Possibly something like keyboard_brightness_shortcut and a sentence with "to be replaced with SUPER, F3 or XF86KbdBrightness depending on how your hardware exposes the keyboard backlight shortcut".
-- Erus Iluvatar (talk) 14:18, 6 January 2024 (UTC)Reply[reply]
Sounds good, I'll do it at some point in the next few days :) Dungeonseeker (talk) 14:59, 6 January 2024 (UTC)Reply[reply]
I'll probably make it one of my edits for tomorrow :P
-- Erus Iluvatar (talk) 22:43, 6 January 2024 (UTC)Reply[reply]
Also it seems mine is in the firmware category, I just checked and indeed WEV shows absolutely nothing with the kb backlight keys but the screen backlight ones shows xf86mon... Dungeonseeker (talk) 19:25, 6 January 2024 (UTC)Reply[reply]
Now I'm wondering why you had created a second/separate keybind for the keyboard backlight :D
-- Erus Iluvatar (talk) 22:43, 6 January 2024 (UTC)Reply[reply]
Because I wanted the OSD when changing brightness and using the function key ignores the script entirely. Its actually great because FN works no matter what so if I accidentally press FN and not Super the backlight still changes :D Dungeonseeker (talk) 12:07, 7 January 2024 (UTC)Reply[reply]
Hmm, then maybe leaving the page without a placeholder will be more relevant for the people who need to set a keybind?
Although probably adding back the note about if handled by firmware it's not necessary or something?
Is there a way to get the value of the backlight and avoid having to create a whole separate keybind simply for an OSD?
-- Erus Iluvatar (talk) 13:07, 7 January 2024 (UTC)Reply[reply]
If you head to my user page I made a first pass at adding the info to the kb backlight page, I'm gonna be out for at least a few hours now, feel free to edit it as needed. IMO its best if we get the backlight page done first then I can link to that from here to explain the diffs Dungeonseeker (talk) 13:11, 7 January 2024 (UTC)Reply[reply]
thats very interesting indeed..
Well, we could edit the wiki to have them both, because if the xf86kbd...dont work, they could use the F2 or F3 or whevever there hardware keyboard brightness control is located Ja.koolit (talk) 03:24, 8 January 2024 (UTC)Reply[reply]