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@xxxxxxxxxx>
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@xxxxxxxxxx> 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 } };