From patchwork Fri Feb 12 00:04:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 12084617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9FA2C433E0 for ; Fri, 12 Feb 2021 01:58:58 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3327D64E3B for ; Fri, 12 Feb 2021 01:58:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3327D64E3B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lANjV-0004qx-Bk for qemu-devel@archiver.kernel.org; Thu, 11 Feb 2021 20:58:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53416) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lALwu-0006gS-1Q for qemu-devel@nongnu.org; Thu, 11 Feb 2021 19:04:40 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:43448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lALws-0000BS-CR for qemu-devel@nongnu.org; Thu, 11 Feb 2021 19:04:39 -0500 Received: by mail-pf1-x432.google.com with SMTP id c11so4736486pfp.10 for ; Thu, 11 Feb 2021 16:04:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SQSolHD56CysPPaB1EfYj1eQNgKh4RvsTWDzwhN95Iw=; b=BHslBMWizsM5QKupNcBPoa88OsamHesFByD8JaQ4NjtwuPLpDd5kck5vWJK6CcXx5J Q/D++QUap4TAv/A+gWteOULnK3DWNNoPVhXV75+SYLc6VPfRagGr7xaR0hnVN6sOpgWg CbFhi7OkOhX3GPv1F7DOsWNq6az4g/s8zkE81c/QcYc2heJF2YiSXKiz1YZXiYmAI+j6 5FsCdxrpLRbCVjXJGKasw2UNYJ6SDGYzyQeTk/lB89bYQmYnY9rT5CmesRexeNtXAT52 eIgjl4y5F83Pbu9Iyokp/+z62lP3e93WcZT7REbF37B+kqIu+pAQuit/jOZOSt4uNMNV kUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SQSolHD56CysPPaB1EfYj1eQNgKh4RvsTWDzwhN95Iw=; b=e/r1OMW1pXYdE7hL/VM3JtqJUeXN8rGWQ3VpHYo+P51YpGUDTD6dlzjdejpOoF+T/3 h6Mh2l84PLVNWJZ88wfeXrHKVzP5WQ2yeW6SC94aGWTG5d1jMnGAyoc2u2KrNN7M0yJo CP4tMQsRjwIeKJYJyFtwS1Q8toEfumyqSYrz3fgB2VxJ3K3zbk7hqbSx2Pbd6c6A9dxo lvvfOUOZm4raye7T4bZxbEgYXKg7K78q8i4q2lIJ9u4vwi4fdusCL8bVd2JksnubEdxr Iv+5OLcYAH0+74vpwFuaL1ZnumrN5HajEwuSLjGD8ockPEKxsPraVjV2XbvC1t0SfU/v Q54A== X-Gm-Message-State: AOAM5323tD3/kEZ9YzJ8YDfj+0FBfOn1WZd66pvmYZ9hGNGPTJ8I5IaV MjWo6hFCasuhDbDubP/tnJw= X-Google-Smtp-Source: ABdhPJyBCax8DeWNnZWvlAPuC9VydwWI2K/y1fJ/5P5N6lSP5c1A+7fKgmdZj+2APwDmzpAjjNBAaQ== X-Received: by 2002:a63:d751:: with SMTP id w17mr612122pgi.182.1613088276296; Thu, 11 Feb 2021 16:04:36 -0800 (PST) Received: from localhost.localdomain ([210.227.19.68]) by smtp.gmail.com with ESMTPSA id y14sm6527550pjg.52.2021.02.11.16.04.34 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Feb 2021 16:04:35 -0800 (PST) From: Akihiko Odaki To: Subject: [PATCH] ui/cocoa: Support unique keys of JIS keyboards Date: Fri, 12 Feb 2021 09:04:04 +0900 Message-Id: <20210212000404.28413-1-akihiko.odaki@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=akihiko.odaki@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 11 Feb 2021 20:57:23 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, kraxel@redhat.com, Akihiko Odaki , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 13fba8103e1..78fcfeaf04b 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -240,6 +240,13 @@ static bool bool_with_iothread_lock(BoolCodeBlock block) [kVK_F14] = Q_KEY_CODE_SCROLL_LOCK, [kVK_F15] = Q_KEY_CODE_PAUSE, + // JIS keyboards only + [kVK_JIS_Yen] = Q_KEY_CODE_YEN, + [kVK_JIS_Underscore] = Q_KEY_CODE_RO, + [kVK_JIS_KeypadComma] = Q_KEY_CODE_KP_COMMA, + [kVK_JIS_Eisu] = Q_KEY_CODE_MUHENKAN, + [kVK_JIS_Kana] = Q_KEY_CODE_HENKAN, + /* * The eject and volume keys can't be used here because they are handled at * a lower level than what an Application can see.