Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp499463pxv; Thu, 8 Jul 2021 07:21:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfDgDbh+n23kiBMKe/zPtryQH+4EOEi6ALA5d08g+8QtE2+1vs72wUNIN3/MOYbXvpt05y X-Received: by 2002:a05:6e02:1e03:: with SMTP id g3mr22243629ila.248.1625754081125; Thu, 08 Jul 2021 07:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625754081; cv=none; d=google.com; s=arc-20160816; b=fwHrBqNdz8Iy74VdYocLAtd+lXj93ifn6ImFdTVCchgMbTcKUOCpNQbEs0HMdqwkPz 2dhiEVXQxlFX0Dx2tx8hdiXlt3liWg/oldYY7t57tWOUVe+lWuBFqjHEbV2dpxal7/wZ VHW+8tvRS7fye6lzsqik8RgG800CiUEAinsCH+wE8i02MqlFU+ztfGBpNN1R4Guvks2Z Ow8XJ+/Lb+6Y9JGllIZH8R8qlczjGoKOYWykWDyUSOwabUy/lx4vB5i2W+Vnw2+dDGdp cXdgfg3VM/2yHk2OttDRHCiBzmnhU/Y034wC1WMtfhsTyoKwb1Rp9tTh09Ulk5n+xhIk Jxpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=kzQXtrYuc9gl/0YtFH+trMRwktl5ZoNUWtawwJE+OKg=; b=01MsdXiIorPhM3df8CRzqVM+mZXa0ZJqN8UoyBMsJ4CcKQU2SgBWWsiaFe7KiEoo6U PJlaU6BcaN39lSPM+BJYK2xirwysZdHwyfAcGoZrpVegAljE7tV9zDe7firkzBASC1Wg NdTeQhx2jqQx2djNH2LFY9CwC3CIp5ZjCor4fpeT8u8dKXKbpISxNw7bcs3jaBkqgUD2 rfCpBk4sOtn+/kvLLwcI4kDCZu/MlTu9f4bFcz3JSMEjONJBmmeWDNb+4M8snE/9f+CM qVLUw2NU9z/0NHu1Nhyfax3v718FZ8uctABjOHf0UE8bIcFo6wZmiXuMbNCobsAZMTED RmNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=WxjSKTqU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j17si2476654jap.126.2021.07.08.07.21.08; Thu, 08 Jul 2021 07:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@posteo.de header.s=2017 header.b=WxjSKTqU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231970AbhGHOWY (ORCPT + 99 others); Thu, 8 Jul 2021 10:22:24 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58317 "EHLO mout01.posteo.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231965AbhGHOWY (ORCPT ); Thu, 8 Jul 2021 10:22:24 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id DCF32240026 for ; Thu, 8 Jul 2021 16:19:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1625753980; bh=zicqAZ7JeXd7r/KlOZ/IYGKV7jWtQKPpW8wVlrHAPAk=; h=Date:From:To:Cc:Subject:From; b=WxjSKTqUR7xy6oM1vaOAea2+dPNEvSlendQbrgf6nHGStZPPsNfzASNl7jjwSuwW1 cUof0T60H6rAhG/5AX24QPAfXhBg8vS5V16XPhHj2nbGTuwGJup0z5sA0Uch/nFgNA 5CP4lM51ZFQJqDB4uZmAGkEgGsOJ7czfkq8m/lU9lh8a+X65gDJdGU8UxUaaDts5TF HD85Xhz4hDlOJaTQDOGH0y9PAoVCQlwLpJkDtcDk0jhsxl6wQeUtkFGuQfreJX1xm/ alYNCt+JyG2P3C/RKhKvDzgfhIr9xoEl0ju/LmP4gbgg06lFCp6jwwAljvGIXeEEMD lMGtZTGypTtLw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GLJMc3yycz6tmG; Thu, 8 Jul 2021 16:19:40 +0200 (CEST) Date: Thu, 8 Jul 2021 14:19:35 +0000 From: Julian Weigt To: jikos@kernel.org, benjamin.tissoires@redhat.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: BUG: cannot enable iso_layout with apple keyboard Message-ID: <20210708141935.bx33mv2jxtm752z3@julianexternal> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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