Re: [PATCH] HID: apple: Use country code to detect ISO keyboards

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

 



On 06/02/2017, 07:45 AM, Alex Henrie wrote:
> At least on newer laptops, Apple uses the same USB ID for both ISO and
> ANSI keyboards. However, they have been good about filling in the
> bCountryCode field in the HID descriptor on all of their keyboards. A
> value of 13 indicates an ISO layout and other values indicate various
> country-specific ANSI layouts.
> 
> With this patch, users of Apple US keyboards will no longer have to run
> `echo 0 > /sys/module/hid_apple/parameters/iso_layout` to get a working
> tilde key.
> 
> Please test this patch and send feedback if you have a Macbook or an
> Apple keyboard.
> 
> Signed-off-by: Alex Henrie <alexhenrie24@xxxxxxxxx>
> ---
>  drivers/hid/hid-apple.c | 64 ++++++++++++++++++++++---------------------------
>  1 file changed, 28 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index 2e046082210f..77396400bbd8 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -28,11 +28,10 @@
>  #define APPLE_IGNORE_MOUSE	0x0002
>  #define APPLE_HAS_FN		0x0004
>  #define APPLE_HIDDEV		0x0008
> -#define APPLE_ISO_KEYBOARD	0x0010
> -#define APPLE_MIGHTYMOUSE	0x0020
> -#define APPLE_INVERT_HWHEEL	0x0040
> -#define APPLE_IGNORE_HIDINPUT	0x0080
> -#define APPLE_NUMLOCK_EMULATION	0x0100
> +#define APPLE_MIGHTYMOUSE	0x0010
> +#define APPLE_INVERT_HWHEEL	0x0020
> +#define APPLE_IGNORE_HIDINPUT	0x0040
> +#define APPLE_NUMLOCK_EMULATION	0x0080

I wouldn't recommend renumbering as it is a nightmare for backporting.
Just leave there a gap.

thanks,
-- 
js
suse labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux