From patchwork Thu Dec 7 06:56:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev\" via" X-Patchwork-Id: 10097753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D75DD602BF for ; Thu, 7 Dec 2017 06:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA90D2A058 for ; Thu, 7 Dec 2017 06:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF6A22A1F9; Thu, 7 Dec 2017 06:58:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3CC4A2A058 for ; Thu, 7 Dec 2017 06:58:02 +0000 (UTC) Received: from localhost ([::1]:59269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMq89-0006L6-RQ for patchwork-qemu-devel@patchwork.kernel.org; Thu, 07 Dec 2017 01:58:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eMq7X-0005rM-Mx for qemu-devel@nongnu.org; Thu, 07 Dec 2017 01:57:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eMq7W-0007I1-S5 for qemu-devel@nongnu.org; Thu, 07 Dec 2017 01:57:23 -0500 Received: from mail-it0-x242.google.com ([2607:f8b0:4001:c0b::242]:43936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eMq7W-0007GN-Nl for qemu-devel@nongnu.org; Thu, 07 Dec 2017 01:57:22 -0500 Received: by mail-it0-x242.google.com with SMTP id u62so12412032ita.2 for ; Wed, 06 Dec 2017 22:57:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Z6MjrmP65oE9QYIzT8FBsioiLUXhs0ZDCfK4EkNVVgY=; b=FTzq4YYggJFKRdSkU4bEEgXv0AeKLfuHzLr6l/pOEuYONjFVQ4fEAQGjY9PyWsiuTP qzxr/b/beqZLyjW6L/J0nbkq9aFtkDUeTB2kR5Niwo+vOmK7Y5yW9YW/MJYGxsaaneoB FmDocMk9XA8WZFN6l/PI16qPcYIPT30UM8xGapRsyXVLXQ3JMwejYqyR8cjt30W992SW ENMynvHbCGfQukwtIZuvslaq70QLWpFBO+53StAHuS1Rr0kE7tDI0qFSRpIflbkqcVtS dOuZOk6dD+VgUmAjy/GQvBoscMcYbUY674fVVa+Deu2euBOsWPX+AD2jNkn9vZfusP7q 0nrQ== 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; bh=Z6MjrmP65oE9QYIzT8FBsioiLUXhs0ZDCfK4EkNVVgY=; b=idXR6xxgWlXB/UbE6JjMEkwqjlro1szytZhJeWu5KhHHbe+2WiMhLw217gxjZm2YVS LmLqh35mpkzwpdxjJpqFZcQkCkedh4280w7eFpbGTjMOO9iVOMq7wodVzyz2CpKkZ9Tw rIgvkPilKfA0eBa9NRHijvVsV9QZBZ/QCNu4ZsEFQc1nz6+w2YkBsLufBwb28LXPRv7E e7OvVaQ7u3MXPEMjQSe3ZXryk/J1L5OAotXX03zYXz0glQ+x9COU6MlrHhIy50ZrhzYu ZKVnBG4KYxOdR8bqSgIQrpXxi8z4Np0gX58HlFPeY1WXkCAqLUwwC1iuWpWZPQqmQ0F9 UHXg== X-Gm-Message-State: AJaThX4I4YS3Q+fTpnSeO0qMTNumlpNlaavVAWQJnt4NbrBoutFIjz5O 6ieEUFxm5rLibnAbrh7zgyRpeA== X-Google-Smtp-Source: AGs4zMZT4BRCq2tVNAXxGqGaOe5ukaM8S6+nbKNMaPl5CwTXesNKnzs6JiGuUZI4S3jfPxF8vD2DOg== X-Received: by 10.107.205.69 with SMTP id d66mr39098371iog.254.1512629840283; Wed, 06 Dec 2017 22:57:20 -0800 (PST) Received: from paxos.mtv.corp.google.com ([2620:0:1000:1611:5546:7876:68e0:7001]) by smtp.gmail.com with ESMTPSA id i133sm7165420itf.1.2017.12.06.22.57.18 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 22:57:18 -0800 (PST) To: qemu-devel@nongnu.org Date: Wed, 6 Dec 2017 22:56:39 -0800 Message-Id: <20171207065639.164900-1-lepton@google.com> X-Mailer: git-send-email 2.15.1.424.g9478a66081-goog X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::242 Subject: [Qemu-devel] [PATCH] hw/input/hid: Add support for several keys. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tao Wu via Qemu-devel From: "Denis V. Lunev\" via" Reply-To: Tao Wu Cc: qemu-trivial@nongnu.org, Tao Wu , mjt@tls.msk.ru, kraxel@redhat.com, laurent@vivier.eu Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add support for these keys: audiomute volumedown volumeup power. Tested with "sendkey" command in monitor and verify the behavior in guest OS. Signed-off-by: Tao Wu --- hw/input/hid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/input/hid.c b/hw/input/hid.c index 0d049ff61c..aa4fb826fd 100644 --- a/hw/input/hid.c +++ b/hw/input/hid.c @@ -57,14 +57,14 @@ static const uint8_t hid_usage_keys[0x100] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0xe4, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46, + 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x46, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x48, 0x4a, 0x52, 0x4b, 0x00, 0x50, 0x00, 0x4f, 0x00, 0x4d, 0x51, 0x4e, 0x49, 0x4c, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe3, 0xe7, 0x65, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,