X86 platform drivers
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Sid Sun <sid@sidsun.com>,
	platform-driver-x86 <platform-driver-x86@vger.kernel.org>,
	andy <andy@kernel.org>
Subject: Re: [PATCH] platform/x86: hp-wmi: Add support for home in HP OMEN laptops
Date: Sat, 26 Sep 2020 12:47:33 +0200	[thread overview]
Message-ID: <cad5f2ab-e319-b6fd-360d-5beb62d6899f@redhat.com> (raw)
In-Reply-To: <174c79fb794.120dada4b39603.5369737602791060462@sidsun.com>

Hi,

On 9/26/20 1:36 AM, Sid Sun wrote:
> HP OMEN laptops have a key for OMEN Command Center where home key should be, which is not supported by current hp-wmi drivers, this patch addresses this, making use of the key as a dedicated home key
> 
> Without the patch in place, hp_wmi logs the following in dmesg:
> - hp_wmi: Unknown key code - 0x21a5
> 
> Tested and developed on: OMEN by HP Laptop 15-ce0xx
> 
> Signed-off-by: Sidharth Soni (Sid Sun) <sid@sidsun.com>

So after looking at:

http://s3.amazonaws.com/digitaltrends-uploads-prod/2017/09/HP-Omen-15-review-keyboard-2.jpg

I understand what you mean with "where home key should be". So I've been thinking
a bit about what is the best thing to do here. Arguably mapping it to
KEY_CONTROLPANEL would be more accurate. But I can completely understand how
you just want to have a working "home" key; and it indeed is in the place
where on HP laptop keyboards with a num-pad, you would expect the home key.

So lets just map it to KEY_HOME as you suggest:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> 
> diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
> index 1762f335b..11cf8d1d6 100644
> --- a/drivers/platform/x86/hp-wmi.c
> +++ b/drivers/platform/x86/hp-wmi.c
> @@ -149,6 +149,7 @@ static const struct key_entry hp_wmi_keymap[] = {
>          { KE_KEY, 0x2169, { KEY_ROTATE_DISPLAY } },
>          { KE_KEY, 0x216a, { KEY_SETUP } },
>          { KE_KEY, 0x231b, { KEY_HELP } },
> +       { KE_KEY, 0x21a5, { KEY_HOME } },
>          { KE_END, 0 }
>   };
> 


       reply	other threads:[~2020-09-26 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <174c79fb794.120dada4b39603.5369737602791060462@sidsun.com>
2020-09-26 10:47 ` Hans de Goede [this message]
2020-11-28  2:19   ` [PATCH] platform/x86: hp-wmi: Add support for home in HP OMEN laptops Dana Goyette
2020-11-28  2:55     ` Dana Goyette
2020-11-28 11:13       ` Hans de Goede
2020-11-29  5:38         ` Dana Goyette
2020-11-29 12:09           ` Hans de Goede

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=cad5f2ab-e319-b6fd-360d-5beb62d6899f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=andy@kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=sid@sidsun.com \
    /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