You are not logged in.
Hello,
I try to get Fn key (backlight, sound control) working on my P14s. My window manager is i3 and I have these settings in order to control backlight or volume:
# screen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10
bindsym XF86MonBrightnessDown exec xbacklight -dec 10
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
Unfortunately, it seems Fn key are not detected. I tried with xev, it only detects XF86WakeUp when I press Fn key, and it displays another code when I press volume key.
I tried to boot on a Manjaro Livecd (XFCE) and everything is working fine ! I really wonder how does it works !
I checked with xev, and it also detects another code, but not XF86AudioRaiseVolume etc...
Do you know how it works? Is it the window manager that handle Fn keys?
Thanks!
Offline
another tool for debugging is `sudo libinput debug-events`
Offline
Thank you, here are the output:
event4 KEYBOARD_KEY +2.256s KEY_WAKEUP (143) pressed
event4 KEYBOARD_KEY +2.438s KEY_VOLUMEDOWN (114) pressed
event4 KEYBOARD_KEY +2.535s KEY_VOLUMEDOWN (114) released
event4 KEYBOARD_KEY +2.759s KEY_WAKEUP (143) released
How can we associate these keys with XF86AudioLowerVolume for example?
How this is handled in other distro, like manjaro?
Last edited by anayrat (2022-04-22 14:07:46)
Offline
I installed xfce and Fn key worked fine. So, I understand I must find a way to associate Fn key code to i3 actions.
Offline
I tried to use xmodmap to map Fn key, but it seems it doesn't detect keycode.
When I use xev, it doesn't detect KeyPress event, but only KeymapNotify:
KeymapNotify event, serial 29, synthetic NO, window 0x0,
keys: 4294967232 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeymapNotify event, serial 29, synthetic NO, window 0x0,
keys: 4294967232 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Offline
For example, backlight keys are associated with keycode 224 and 225 when I use "showkey" in a console.
Last edited by anayrat (2022-04-25 07:28:25)
Offline