[PATCH v2] platform/x86: huawei-wmi: add camera toggle keycode

Ruzal Daminov posted 1 patch 1 month, 1 week ago
drivers/platform/x86/huawei-wmi.c | 1 +
1 file changed, 1 insertion(+)
[PATCH v2] platform/x86: huawei-wmi: add camera toggle keycode
Posted by Ruzal Daminov 1 month, 1 week ago
Honor MagicBook laptops emit WMI event code 0x288 when pressing the
camera e-shutter / privacy toggle key (Fn+F8 on Honor).

Add the missing 0x288 keycode to huawei_wmi_keymap[] in correct numerical
order and map it to KEY_CAMERA_ACCESS_TOGGLE.

Tested on Honor MagicBook X14 Plus (FMI-76, AMD Ryzen 8845HS).

Signed-off-by: Ruzal Daminov <daminovruzal7@gmail.com>
---
v2:
 - Drop duplicate keys already present in the table.
 - Remove leading zeros to match existing table style.
 - Place 0x288 in correct numerical order.
 - Map 0x288 to KEY_CAMERA_ACCESS_TOGGLE.

 drivers/platform/x86/huawei-wmi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/huawei-wmi.c b/drivers/platform/x86/huawei-wmi.c
index 93cca17fdf5868..b5463edc4053d4 100644
--- a/drivers/platform/x86/huawei-wmi.c
+++ b/drivers/platform/x86/huawei-wmi.c
@@ -78,6 +78,7 @@ static const struct key_entry huawei_wmi_keymap[] = {
 	{ KE_KEY,    0x285, { KEY_VOLUMEDOWN } },
 	{ KE_KEY,    0x286, { KEY_VOLUMEUP } },
 	{ KE_KEY,    0x287, { KEY_MICMUTE } },
+	{ KE_KEY,    0x288, { KEY_CAMERA_ACCESS_TOGGLE } },
 	{ KE_KEY,    0x289, { KEY_WLAN } },
 	// Huawei |M| key
 	{ KE_KEY,    0x28a, { KEY_CONFIG } },
-- 
2.45.2
Re: [PATCH v2] platform/x86: huawei-wmi: add camera toggle keycode
Posted by Ilpo Järvinen 1 week, 2 days ago
On Wed, 19 Aug 2026 11:38:36 +0300, Ruzal Daminov wrote:

> Honor MagicBook laptops emit WMI event code 0x288 when pressing the
> camera e-shutter / privacy toggle key (Fn+F8 on Honor).
> 
> Add the missing 0x288 keycode to huawei_wmi_keymap[] in correct numerical
> order and map it to KEY_CAMERA_ACCESS_TOGGLE.
> 
> Tested on Honor MagicBook X14 Plus (FMI-76, AMD Ryzen 8845HS).
> 
> [...]

Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.

The list of commits applied:
[1/1] platform/x86: huawei-wmi: add camera toggle keycode
      commit: 885b55bcd2336c578821b0788aac95c4679d68e3

--
 i.