From: "José Expósito" <jose.exposito89@gmail.com>
To: juw@posteo.de
Cc: alexhenrie24@gmail.com, benjamin.tissoires@redhat.com,
jikos@kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: BUG: cannot enable iso_layout with apple keyboard
Date: Wed, 14 Jul 2021 09:57:23 +0200 [thread overview]
Message-ID: <20210714075723.17294-1-jose.exposito89@gmail.com> (raw)
In-Reply-To: <20210708141935.bx33mv2jxtm752z3@julianexternal>
> Hi,
>
> I have an apple keyboard model A1644 EMC 2815 with Finnish/Swedish ISO layout. When I connect it via
> cable it works fine. But when I connect it via bluetooth, then the buttons >/< and §/° are swapped.
> It seems to make no difference if I set iso_layout to 0 or to 1. I checked and it turns out that
> hid->country below equals 0, and removing the check
>
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index 6b8f0d004d34..8a764ce4e518 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -267,13 +267,11 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
> }
>
> if (iso_layout) {
> - if (hid->country == HID_COUNTRY_INTERNATIONAL_ISO) {
> trans = apple_find_translation(apple_iso_keyboard, usage->code);
> if (trans) {
> input_event(input, usage->type, trans->to, value);
> return 1;
> }
> - }
> }
>
> if (swap_opt_cmd) {
>
> makes the buttons act correctly. Please let me know how I can help fixing this.
>
> Best regards,
> Julian Weigt
Hi Julian,
I can confirm I can reproduce the issue with a Spanish/Spain keyboard.
The problem seems to be that the field "bCountryCode" is not present when the keyboard is connected over bluetooth.
CCing Alex Henrie, hopefully he can add useful information about the issue.
Best wishes,
Jose
next prev parent reply other threads:[~2021-07-14 7:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-08 14:19 BUG: cannot enable iso_layout with apple keyboard Julian Weigt
2021-07-14 7:57 ` José Expósito [this message]
2021-07-27 21:58 ` Alex Henrie
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=20210714075723.17294-1-jose.exposito89@gmail.com \
--to=jose.exposito89@gmail.com \
--cc=alexhenrie24@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=juw@posteo.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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