Message ID | 20220829163544.5288-1-hdegoede@redhat.com (mailing list archive) |
---|---|
State | Handled Elsewhere, archived |
Headers | show |
Series | platform/x86: acer-wmi: Acer Aspire One AOD270/Packard Bell Dot keymap fixes | expand |
Hi, On 8/29/22 18:35, Hans de Goede wrote: > 2 keymap fixes for the Acer Aspire One AOD270 and the same hardware > rebranded as Packard Bell Dot SC: > > 1. The F2 key is marked with a big '?' symbol on the Packard Bell Dot SC, > this sends WMID_HOTKEY_EVENTs with a scancode of 0x27 add a mapping > for this. > > 2. Scancode 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate > input event with the "Video Bus" input device events. But on these devices > the "Video Bus" does not send events for this key. Map 0x61 to KEY_UNKNOWN > instead of using KE_IGNORE so that udev/hwdb can override it on these devs. > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> I've added this to my review-hans (soon to be for-next) branch now. Regards, Hans > --- > drivers/platform/x86/acer-wmi.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c > index b933a5165edb..9610742fe6aa 100644 > --- a/drivers/platform/x86/acer-wmi.c > +++ b/drivers/platform/x86/acer-wmi.c > @@ -99,6 +99,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { > {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ > {KE_KEY, 0x23, {KEY_PROG3} }, /* P_Key */ > {KE_KEY, 0x24, {KEY_PROG4} }, /* Social networking_Key */ > + {KE_KEY, 0x27, {KEY_HELP} }, > {KE_KEY, 0x29, {KEY_PROG3} }, /* P_Key for TM8372 */ > {KE_IGNORE, 0x41, {KEY_MUTE} }, > {KE_IGNORE, 0x42, {KEY_PREVIOUSSONG} }, > @@ -112,7 +113,13 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { > {KE_IGNORE, 0x48, {KEY_VOLUMEUP} }, > {KE_IGNORE, 0x49, {KEY_VOLUMEDOWN} }, > {KE_IGNORE, 0x4a, {KEY_VOLUMEDOWN} }, > - {KE_IGNORE, 0x61, {KEY_SWITCHVIDEOMODE} }, > + /* > + * 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event > + * with the "Video Bus" input device events. But sometimes it is not > + * a dup. Map it to KEY_UNKNOWN instead of using KE_IGNORE so that > + * udev/hwdb can override it on systems where it is not a dup. > + */ > + {KE_KEY, 0x61, {KEY_UNKNOWN} }, > {KE_IGNORE, 0x62, {KEY_BRIGHTNESSUP} }, > {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, > {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index b933a5165edb..9610742fe6aa 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -99,6 +99,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_KEY, 0x22, {KEY_PROG2} }, /* Arcade */ {KE_KEY, 0x23, {KEY_PROG3} }, /* P_Key */ {KE_KEY, 0x24, {KEY_PROG4} }, /* Social networking_Key */ + {KE_KEY, 0x27, {KEY_HELP} }, {KE_KEY, 0x29, {KEY_PROG3} }, /* P_Key for TM8372 */ {KE_IGNORE, 0x41, {KEY_MUTE} }, {KE_IGNORE, 0x42, {KEY_PREVIOUSSONG} }, @@ -112,7 +113,13 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_IGNORE, 0x48, {KEY_VOLUMEUP} }, {KE_IGNORE, 0x49, {KEY_VOLUMEDOWN} }, {KE_IGNORE, 0x4a, {KEY_VOLUMEDOWN} }, - {KE_IGNORE, 0x61, {KEY_SWITCHVIDEOMODE} }, + /* + * 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event + * with the "Video Bus" input device events. But sometimes it is not + * a dup. Map it to KEY_UNKNOWN instead of using KE_IGNORE so that + * udev/hwdb can override it on systems where it is not a dup. + */ + {KE_KEY, 0x61, {KEY_UNKNOWN} }, {KE_IGNORE, 0x62, {KEY_BRIGHTNESSUP} }, {KE_IGNORE, 0x63, {KEY_BRIGHTNESSDOWN} }, {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */
2 keymap fixes for the Acer Aspire One AOD270 and the same hardware rebranded as Packard Bell Dot SC: 1. The F2 key is marked with a big '?' symbol on the Packard Bell Dot SC, this sends WMID_HOTKEY_EVENTs with a scancode of 0x27 add a mapping for this. 2. Scancode 0x61 is KEY_SWITCHVIDEOMODE. Usually this is a duplicate input event with the "Video Bus" input device events. But on these devices the "Video Bus" does not send events for this key. Map 0x61 to KEY_UNKNOWN instead of using KE_IGNORE so that udev/hwdb can override it on these devs. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/platform/x86/acer-wmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)