]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
platform/x86: dell-wmi-base: Handle META key Lock/Unlock events
authorKurt Borja <kuurtb@gmail.com>
Thu, 31 Oct 2024 15:44:42 +0000 (12:44 -0300)
committerHans de Goede <hdegoede@redhat.com>
Mon, 4 Nov 2024 10:49:26 +0000 (11:49 +0100)
Some Alienware devices have a key that locks/unlocks the Meta key. This
key triggers a WMI event that should be ignored by the kernel, as it's
handled by internally the firmware.

There is no known way of changing this default behavior. The firmware
would lock/unlock the Meta key, regardless of how the event is handled.

Tested on an Alienware x15 R1.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20241031154441.6663-2-kuurtb@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/dell/dell-wmi-base.c

index 24fd7ffadda95263e6af1e73da32586f4fde53a7..841a5414d28a68633a11d7b3ec443ae28c69c460 100644 (file)
@@ -80,6 +80,12 @@ static const struct dmi_system_id dell_wmi_smbios_list[] __initconst = {
 static const struct key_entry dell_wmi_keymap_type_0000[] = {
        { KE_IGNORE, 0x003a, { KEY_CAPSLOCK } },
 
+       /* Meta key lock */
+       { KE_IGNORE, 0xe000, { KEY_RIGHTMETA } },
+
+       /* Meta key unlock */
+       { KE_IGNORE, 0xe001, { KEY_RIGHTMETA } },
+
        /* Key code is followed by brightness level */
        { KE_KEY,    0xe005, { KEY_BRIGHTNESSDOWN } },
        { KE_KEY,    0xe006, { KEY_BRIGHTNESSUP } },