Re: [PATCH] platform/x86: thinkpad_acpi: Add support for calculator hotkey

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2018-06-19 at 15:12 -0300, Henrique de Moraes Holschuh wrote:
> On Tue, 19 Jun 2018, Benjamin Berg wrote:
> > The P52 has a keyboard which features a calculator key above the
> > numpad.
> > Add support for this the calculator key (0x1313).
> > 
> > Signed-off-by: Benjamin Berg <bberg@xxxxxxxxxx>
> > ---
> >  drivers/platform/x86/thinkpad_acpi.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/platform/x86/thinkpad_acpi.c
> > b/drivers/platform/x86/thinkpad_acpi.c
> > index cae9b0595692..6c979fe44ea7 100644
> > --- a/drivers/platform/x86/thinkpad_acpi.c
> > +++ b/drivers/platform/x86/thinkpad_acpi.c
> > @@ -1928,7 +1928,7 @@ enum {	/* hot key scan codes (derived
> > from ACPI DSDT) */
> >  	/* first new observed key (star, favorites) is 0x1311 */
> >  	TP_ACPI_HOTKEYSCAN_STAR = 69,
> >  	TP_ACPI_HOTKEYSCAN_CLIPPING_TOOL2,
> > -	TP_ACPI_HOTKEYSCAN_UNK25,
> > +	TP_ACPI_HOTKEYSCAN_CALCULATOR,
> >  	TP_ACPI_HOTKEYSCAN_BLUETOOTH,
> >  	TP_ACPI_HOTKEYSCAN_KEYBOARD,
> >  
> > @@ -3449,7 +3449,7 @@ static int __init hotkey_init(struct
> > ibm_init_struct *iibm)
> >  
> >  		KEY_FAVORITES,       /* Favorite app, 0x311 */
> >  		KEY_RESERVED,        /* Clipping tool */
> > -		KEY_RESERVED,
> > +		KEY_CALC,            /* Calculator (above numpad),
> > 0x313 */
> 
> Replace 0x313 with (P52) please.

Sure.

> Other than that,
> Acked-by: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
> 
> 
> That said, it would be nice to know if other models also have this
> hotkey, especially if it has a different meaning (in which case we just
> special-case the keymap in the driver, so it is *not* a problem).

I believe this is not specific to the P52 but simply the keyboard
version that includes a numpad. I only have the P52, but looking at
photos of e.g. the T570 and T580 the keyboard looks identical there.

On a different note, these keyboards also have "=", "(" and ")" keys
above the numpad. These keys emit the key combinations required for a
US keyboard layout on the P52 I have. I do believe there is a way to
set the keyboard layout through ACPI which I suspect changes the
emitted keycodes to match the expected values for other layouts.
Unfortunately supporting that seems quite involved.

Benjamin



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux