[PATCH] platform/x86: redmi-wmi: Add mic-mute key mapping

From: Nika Krasnova

Date: Sat Jun 20 2026 - 11:00:07 EST


The mic-mute key (F4) on the Xiaomi RedmiBook Pro 16 produces WMI events
that were not present in the keymap, so the key did nothing under Linux.

The firmware reports the resulting mute state in the scancode, emitting
one event per press: 0x00002101 when it transitions to muted and
0x00012101 when it transitions to unmuted. Map both to KEY_MICMUTE so
each press is reported as a single mic-mute keypress to userspace.

Signed-off-by: Nika Krasnova <nika@xxxxxxxxxxxx>
---
Link to the discussion that motivated this, including the redmi-wmi /
bitland-mifs-wmi event-GUID overlap:
https://lore.kernel.org/all/20260531123345.237521-1-nika@xxxxxxxxxxxx/

drivers/platform/x86/redmi-wmi.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/platform/x86/redmi-wmi.c b/drivers/platform/x86/redmi-wmi.c
index 58898630eda6..e000ce4234cb 100644
--- a/drivers/platform/x86/redmi-wmi.c
+++ b/drivers/platform/x86/redmi-wmi.c
@@ -25,6 +25,10 @@ static const struct key_entry redmi_wmi_keymap[] = {
{KE_KEY, 0x00010101, {KEY_SWITCHVIDEOMODE}},
{KE_KEY, 0x00001a01, {KEY_REFRESH_RATE_TOGGLE}},

+ /* Mic-mute key */
+ {KE_KEY, 0x00002101, {KEY_MICMUTE}},
+ {KE_KEY, 0x00012101, {KEY_MICMUTE}},
+
/* AI button has code for each position */
{KE_KEY, 0x00011801, {KEY_ASSISTANT}},
{KE_KEY, 0x00011901, {KEY_ASSISTANT}},
--
2.51.2