Re: Understanding the ThinkPad W550s keyboard
On Sun, 01 Dec 2019, Celejar wrote:
> 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?
The thinkpad-acpi exports a fully reconfigurable input device. *If* it
gets the keycode from the thinkpad firmware, it can map it to any EV_KEY
event. Refer to its documentation (and to udev's) for details.
Maybe someone wrote a GUI thing to remap input device events. If such a
thing exists, you can use it.
> 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?
In windows, a Lenovo driver hooks to ACPI and WMI and does whatever is
needed. Thinkpad-acpi can handle the ACPI events. No idea about WMI
ones.
> 3) Why doesn't F4 do anything (the microphone continues to work
> regardless of my pressing F4)?
Because you need to mess with the HDA mixer for that to work, I think.
If there *is* an ACPI fuction to change a gate that the standard audio
subsystem cannot mess with, thinkpad-acpi alone might be able to do
something about it.
But if you need to mess with the HDA mixer, you need a cross-subsystem
callback layer to let something inside the kernel order ALSA to mute the
mic and not let anything else unmute it. I don't think this exists
[yet]. So, it boils down to: thinkpad-acpi could generate an input
event, and something in userspace would have to handle it and mute the
mic through alsa.
You could reprogram the thinkpad-acpi input device to issue MIC_MUTE and
see if that gets handled by something in your desktop environment...
--
Henrique Holschuh
Reply to: