mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: "Derek J. Clark" <derekjohn.clark@gmail.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Hans de Goede" <hansg@kernel.org>
Cc: "Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
	platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] platform/x86: msi-wmi: Add MSI Claw M-Center keys
Date: Fri, 12 Jun 2026 19:54:06 +0200	[thread overview]
Message-ID: <30e344d9-014f-4bac-895e-52576d2a73f9@gmx.de> (raw)
In-Reply-To: <20260611223920.1679438-3-derekjohn.clark@gmail.com>

Am 12.06.26 um 00:39 schrieb Derek J. Clark:

> MSI Claw devices produce WMI events through the MSI WMI hotkeys GUID for
> some of their buttons. When pressed, these cause spam in the kernel. For
> the majority of devices these events can be safely ignored as they are
> duplicated by the AT Translated Set 2 Keyboard device exposed as an
> evdev. For the MSI Claw A8 BZ2EM model's M-Center Menu button (left of
> the screen) there is no associated keyboard event, so this event must be
> exposed. Map this button to the same scancode produced by the AT
> Keyboard device on other models. This does cause double F15 events on
> the A1M, 7 AI+ A2VM, and 8 AI+ A2VM, but it appears to be harmless in my
> testing.
>
> Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
> ---
>   drivers/platform/x86/msi-wmi.c | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
>
> diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
> index d00ced756581..73a4f0d2dc04 100644
> --- a/drivers/platform/x86/msi-wmi.c
> +++ b/drivers/platform/x86/msi-wmi.c
> @@ -46,6 +46,12 @@ enum msi_scancodes {
>   	WIND_KEY_WLAN		= 0x5f,	/* Fn+F11 Wi-Fi toggle */
>   	WIND_KEY_TURBO,			/* Fn+F10 turbo mode toggle */
>   	WIND_KEY_ECO		= 0x69,	/* Fn+F10 ECO mode toggle */
> +	/* MSI Claw keys */
> +	CLAW_KEY_VOLUMEDOWN	= 0x21,
> +	CLAW_KEY_CENTER		= 0x29,	/* MSI M-Center main menu */
> +	CLAW_KEY_QUICK_LONG	= 0x2a,	/* MSI M-Center quick access long hold */
> +	CLAW_KEY_VOLUMEUP	= 0x32,
> +	CLAW_KEY_QUICK_SHORT	= 0x58,	/* MSI M-Center quick access short press */
>   };
>   static struct key_entry msi_wmi_keymap[] = {
>   	{ KE_KEY, MSI_KEY_BRIGHTNESSUP,		{KEY_BRIGHTNESSUP} },
> @@ -69,6 +75,15 @@ static struct key_entry msi_wmi_keymap[] = {
>   	{ KE_KEY, WIND_KEY_TURBO,		{KEY_PROG1} },
>   	{ KE_KEY, WIND_KEY_ECO,			{KEY_PROG2} },
>   
> +	/* These are MSI Claw keys, used for MSI M-Center in Windows */
> +	{ KE_KEY, CLAW_KEY_CENTER,		{KEY_F15} },
> +
> +	/* These MSI Claw keys work without WMI. Ignore them to avoid double keycodes */
> +	{ KE_IGNORE, CLAW_KEY_QUICK_SHORT },
> +	{ KE_IGNORE, CLAW_KEY_QUICK_LONG },
> +	{ KE_IGNORE, CLAW_KEY_VOLUMEUP },
> +	{ KE_IGNORE, CLAW_KEY_VOLUMEDOWN },
> +
>   	{ KE_END, 0 }
>   };
>   
> @@ -183,6 +198,13 @@ static void msi_wmi_notify(union acpi_object *obj, void *context)
>   		eventcode = obj->integer.value;
>   		pr_debug("Eventcode: 0x%x\n", eventcode);
>   		break;
> +	case ACPI_TYPE_BUFFER:
> +		if (!obj->buffer.length)
> +			return;
> +
> +		eventcode = obj->buffer.pointer[0];
> +		pr_debug("Eventcode: 0x%x\n", eventcode);

Can you share the BMOF associated with this event? I suspect that the buffer should
contain a u32.

Thanks,
Armin Wolf

> +		break;
>   	default:
>   		pr_info("Unknown event received\n");
>   		return;

  reply	other threads:[~2026-06-12 17:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 22:39 [PATCH 0/2] platform/x86: msi-wmi: Fix unknown wmi event messages on MSI Claw models Derek J. Clark
2026-06-11 22:39 ` [PATCH 1/2] platform/x86: msi-wmi: Reformat msi_wmi_notify() Derek J. Clark
2026-06-11 22:39 ` [PATCH 2/2] platform/x86: msi-wmi: Add MSI Claw M-Center keys Derek J. Clark
2026-06-12 17:54   ` Armin Wolf [this message]
2026-06-12 18:25     ` Derek John Clark
2026-06-12 21:46       ` Armin Wolf
2026-06-12 16:34 ` [PATCH 0/2] platform/x86: msi-wmi: Fix unknown wmi event messages on MSI Claw models Armin Wolf
2026-06-12 17:18   ` Derek John Clark
2026-06-12 17:52     ` Armin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30e344d9-014f-4bac-895e-52576d2a73f9@gmx.de \
    --to=w_armin@gmx.de \
    --cc=derekjohn.clark@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pgriffais@valvesoftware.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®