You are not logged in.

#1 2022-04-22 08:16:32

anayrat
Member
Registered: 2018-05-24
Posts: 8

Thinkpad P14S Gen 2 AMD - Function Key not detected

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

#2 2022-04-22 10:12:52

damjan
Member
Registered: 2006-05-30
Posts: 451

Re: Thinkpad P14S Gen 2 AMD - Function Key not detected

another tool for debugging is `sudo libinput debug-events`

Offline

#3 2022-04-22 14:06:26

anayrat
Member
Registered: 2018-05-24
Posts: 8

Re: Thinkpad P14S Gen 2 AMD - Function Key not detected

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

#4 2022-04-22 15:39:00

anayrat
Member
Registered: 2018-05-24
Posts: 8

Re: Thinkpad P14S Gen 2 AMD - Function Key not detected

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

#5 2022-04-25 07:25:59

anayrat
Member
Registered: 2018-05-24
Posts: 8

Re: Thinkpad P14S Gen 2 AMD - Function Key not detected

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

#6 2022-04-25 07:28:16

anayrat
Member
Registered: 2018-05-24
Posts: 8

Re: Thinkpad P14S Gen 2 AMD - Function Key not detected

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

Board footer

Powered by FluxBB