[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Understanding the ThinkPad W550s keyboard



Hello,

I've always had trouble understanding how all the layers of keyboard
handling code fit together. Here's another attempt at understanding why
some things work on my keyboard and some don't, and - even more
importantly - why.

This is a Lenovo W550s ThinkPad running Debian Sid, with the XFCE
desktop. Here's a chart of what I see with regard to some of the
"special" keys:

Key		Keycode (from evtest)	Result
---		--------		------
F1              KEY_MUTE                mute speaker
F2              KEY_VOLUMEDOWN          volume down
F3              KEY_VOLUMEUP            volume up
F4                                      ("Mutes or unmutes the  microphones" according to User Guide, but doesn't actually do anything on my system)
F5                                      screen brightness down
F6                                      screen brightness up
F7                                      ("Manages external displays" according to User Guide - not tested)
F8                                      rfkill soft block (wifi)
F9                                      (Does stuff in Windows, according to User Guide - doesn't do anything here)
F10                                     (Does stuff in Windows, according to User Guide - doesn't do anything here)
F11                                     ("Views all the programs that you have opened", according to the User Guide - doesn't do anything here)
F12                                     (Does stuff in Windows, according to User Guide - doesn't do anything here)
Calculator      KEY_CALC
Lock            KEY_LEFTMETA + KEY_L    'n' ['l' is mapped to 'n' in the Dvorak layout in use]
Browser         KEY_HOMEPAGE
Computer        KEY_LEFTMETA + KEY_E    '.' ['l' is mapped to 'n' in the Dvorak keymapping in use]

F1-F3 generate keycodes that are congruent to the function they
have according to the User Guide. I think that the actual work is
handled by XFCE - in its settings I see that they are linked to "amixer
set Master toggle", "amixer set Master 2%-", and "amixer set Master 2%
+" respectively. Similarly, the last four special keys just generate
particular scancodes, which I suppose I could easily map to functions
in those XFCE settings (or using other tools).

Questions:

1) Most of the function keys don't seem to have scancodes / keycodes
(evtest doesn't react in any way to their press / release). Is this a
hardware thing - they just aren't designed as keyboard keys - or a
failure of the kernel? Some of the ones that have no keycodes do work,
however (F5-7). Is this happening through the BIOS or something at a
lower level than the kernel?

2) How do the function keys that are supposed to do stuff in Windows
work? If they don't send scancodes, how do they communicate with the
operating system, and how can they be used under Linux?

3) Why doesn't F4 do anything (the microphone continues to work
regardless of my pressing F4)?

Celejar


Reply to: