From nobody Tue Oct 28 12:14:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1513957326520931.7963733087513; Fri, 22 Dec 2017 07:42:06 -0800 (PST) Received: from localhost ([::1]:54593 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPSS-0008AN-5I for importer@patchew.org; Fri, 22 Dec 2017 10:42:00 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPDG-0003MK-DL for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSPDC-0001Il-Bv for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:18 -0500 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:34083) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSPDC-0001IL-4T for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:14 -0500 Received: by mail-lf0-x241.google.com with SMTP id y78so26252478lfd.1 for ; Fri, 22 Dec 2017 07:26:14 -0800 (PST) Received: from es.lan (dsl-tkubng22-58c1fd-134.dhcp.inet.fi. [88.193.253.134]) by smtp.gmail.com with ESMTPSA id b75sm4875793lfe.47.2017.12.22.07.26.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2017 07:26:12 -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:in-reply-to:references; bh=1RK/Ww7kRTeO+Ni+HLXIIpZRK9Bo2BB0Ntid3ijnSps=; b=CJWtPiBELX7OlMZNUiox5ETXChh8j/YwmC2rCaLh/mfQOb1GRtgAFLCw895IRJlGqI vfc1suEoHzw3A5tE0oeTEFWAuP36KYouhg3dkPXY5zatHX1wuzCSae9UVe4PdEQvi5I8 Bf+vGK173IuPPZcNi5C5C0Zi3VEapOgK00sJMlO7bM7rRBu+mN+GKoR9bXyxocWpM6jV nK5OOWbp4YTcB5Y3Z0FPkFw2+ISQWAeIbbgU2XnztZyd9Hw/7pQ3IkofnQp5fK0Z8PEV nyZHbn+APzGxlDxEnDzgizwDzdCVvOOZOZUv62LUM+t6CLFo9bvIdE0WUG38VCfb0aDn QjmA== 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:in-reply-to :references; bh=1RK/Ww7kRTeO+Ni+HLXIIpZRK9Bo2BB0Ntid3ijnSps=; b=l/UEhn+HjRIVETyKYbVpOOgwgn+b0YY4ONZPlhg+Asrl74xRwp1/DqU7iHYQ9PkOcH 9S3wXVAHqRcKUdX6MXGxNmoPdbZC/ifGXXwGnjxF7qvreGr2WfXCt6L+RLPqUNf2nljh sobH7Ha2LR8CfUVItlkvgXn1VL4z/iMYfhQDPkS2XBRO+oSdmSnW9naUbWoVUKtYiakP him2WYBn7rJCcoNPLV4wy2YXQIlwqWY1eA5gDdDoxfFIEDyUoyTHWAqVnAnu2cWmZ9bn Yk9vSxEWxYw8dfjMdom+xuVjCIViRxZvAZC//jGvBk276KvBmm/H9pMIcVaHE5jgmerW zM/g== X-Gm-Message-State: AKGB3mIwq88FH1bcr6bcpIAVm+B+ClLjdUFnC8kidNbSw7NADCBfcYE0 ZmvWCmILZsgCTwlUw169iKVm9V6J X-Google-Smtp-Source: ACJfBosTnBKQdA0XyckEslSp92KMhqpdCz3eF9wDs9vQX1iVvSK/NvWrjuZZCYvslwyyDj7XWZh1rw== X-Received: by 10.46.85.18 with SMTP id j18mr8947802ljb.109.1513956372633; Fri, 22 Dec 2017 07:26:12 -0800 (PST) From: Miika S To: qemu-devel@nongnu.org Date: Fri, 22 Dec 2017 17:25:29 +0200 Message-Id: <20171222152531.1849-2-miika9764@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171222152531.1849-1-miika9764@gmail.com> References: <20171222152531.1849-1-miika9764@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::241 Subject: [Qemu-devel] [PATCH 1/3] input: add missing JIS keys to virtio input 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: , Cc: Miika S , kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" keycodemapdb updated to add the QKeyCodes muhenkan and katakanahiragana Signed-off-by: Miika S Reviewed-by: Daniel P. Berrange --- hw/input/virtio-input-hid.c | 7 +++++++ qapi/ui.json | 5 ++++- ui/keycodemapdb | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index e78faec0b1..9628d289f9 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -139,6 +139,13 @@ static const unsigned int keymap_qcode[Q_KEY_CODE__MAX= ] =3D { [Q_KEY_CODE_META_L] =3D KEY_LEFTMETA, [Q_KEY_CODE_META_R] =3D KEY_RIGHTMETA, [Q_KEY_CODE_MENU] =3D KEY_MENU, + + [Q_KEY_CODE_MUHENKAN] =3D KEY_MUHENKAN, + [Q_KEY_CODE_HENKAN] =3D KEY_HENKAN, + [Q_KEY_CODE_KATAKANAHIRAGANA] =3D KEY_KATAKANAHIRAGANA, + [Q_KEY_CODE_COMPOSE] =3D KEY_COMPOSE, + [Q_KEY_CODE_RO] =3D KEY_RO, + [Q_KEY_CODE_YEN] =3D KEY_YEN, }; =20 static const unsigned int keymap_button[INPUT_BUTTON__MAX] =3D { diff --git a/qapi/ui.json b/qapi/ui.json index 07b468f625..d6679aa8f5 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -748,6 +748,9 @@ # @ac_bookmarks: since 2.10 # altgr, altgr_r: dropped in 2.10 # +# @muhenkan: since 2.12 +# @katakanahiragana: since 2.12 +# # 'sysrq' was mistakenly added to hack around the fact that # the ps2 driver was not generating correct scancodes sequences # when 'alt+print' was pressed. This flaw is now fixed and the @@ -775,7 +778,7 @@ 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'ag= ain', 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cu= t', 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause', - 'ro', 'hiragana', 'henkan', 'yen', + 'ro', 'hiragana', 'henkan', 'yen', 'muhenkan', 'katakanahiraga= na', 'kp_comma', 'kp_equals', 'power', 'sleep', 'wake', 'audionext', 'audioprev', 'audiostop', 'audioplay', 'audiomute= ', 'volumeup', 'volumedown', 'mediaselect', diff --git a/ui/keycodemapdb b/ui/keycodemapdb index 10739aa260..05dad417e9 160000 --- a/ui/keycodemapdb +++ b/ui/keycodemapdb @@ -1 +1 @@ -Subproject commit 10739aa26051a5d49d88132604539d3ed085e72e +Subproject commit 05dad417e9d0b37ee1fba33056d91a6b734b3357 --=20 2.15.1 From nobody Tue Oct 28 12:14:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15139582963074.785748983002122; Fri, 22 Dec 2017 07:58:16 -0800 (PST) Received: from localhost ([::1]:55487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPi4-0005Bu-3C for importer@patchew.org; Fri, 22 Dec 2017 10:58:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPDG-0003Mt-Vw for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSPDG-0001LM-6E for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:19 -0500 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:39555) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSPDF-0001Kh-Ua for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:18 -0500 Received: by mail-lf0-x244.google.com with SMTP id m20so18783708lfi.6 for ; Fri, 22 Dec 2017 07:26:17 -0800 (PST) Received: from es.lan (dsl-tkubng22-58c1fd-134.dhcp.inet.fi. [88.193.253.134]) by smtp.gmail.com with ESMTPSA id b75sm4875793lfe.47.2017.12.22.07.26.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2017 07:26:15 -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:in-reply-to:references; bh=1TkJEzyJMm6xUXUuvExjrTMu6LpqDtX17TGEVn92/lo=; b=AWeRGlOS6Yaiss8dI+jbtIoQHder82euatOiGwE+I3C+sdEKZTFAinIxWlyNNQyM/y fcDa5/FTg7iG+THEKOGny9pCGbl74fQpfdNSzqsK02r3rSIqc4SmiE6DjFj4rYiZAvJ3 yWVafOX3h+OlVTiCOmFvZwsQm0YvCF0j0QdOMOQbN53uxlu00Hu5tdPH/iz4daEvkPWZ OE1Zf1QJ5qaBUpnUVWdW5ZFziWioFTYxJnmSd7vN8QkqRdwK3EsUoMV6yG2oGwmXzt8X xSgHSfFm6nfIsGbQdV3mI4GewxBxEfPvYF7AfiNawuhCSNLBGGLPCmhq8JRydYZk5oD9 5sHQ== 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:in-reply-to :references; bh=1TkJEzyJMm6xUXUuvExjrTMu6LpqDtX17TGEVn92/lo=; b=aO8CDhnxF2kERrCRKblCx+cMubGtfYYUTmIyFoAUq/FA2B0G5RGxjsvaJiwUXdom7G t/FUecQDtHF1ymELrVPDoAW2PkbVXpwb6b1HB79XZCQom6sxDGiOhCK9EmG38WBamoKw 1g1+OSWGHYQ02L7L949UT12J90NcVKbV8j+PUgwJgI+qiiBBF+jc9LWIjHt6HRsoFNhV 1bU5cgQ70ifUblLT1fFtHlcPGWhkHZtF+K+MNrR3v6DWKrd4Fd4a37y1S9YKpQxu7ahH KoIkbKR6v37mK0Y5+aJSMuLcHGWc3Qv7ly3AGEEl3lMFaQEZtdLYX6Xn1DWmk2jr7aDs 626Q== X-Gm-Message-State: AKGB3mJ5blNMcoxFNh9dGaa/rnEoCIt+CFQg4Ph2RPv+khyCsH+aPCGT 4sfPn5Tnl5UKaUAzmbegk9a+ztm+ X-Google-Smtp-Source: ACJfBouJQr8BJlvgO+jGirn1Rg2mXn9tzTyqZpSxf6/2okTPPkony/whtlsfvaknfcJMep7hGETgAA== X-Received: by 10.46.83.9 with SMTP id h9mr9076898ljb.68.1513956376361; Fri, 22 Dec 2017 07:26:16 -0800 (PST) From: Miika S To: qemu-devel@nongnu.org Date: Fri, 22 Dec 2017 17:25:30 +0200 Message-Id: <20171222152531.1849-3-miika9764@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171222152531.1849-1-miika9764@gmail.com> References: <20171222152531.1849-1-miika9764@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH 2/3] input: add mouse side buttons to virtio input 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: , Cc: Miika S , kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Miika S --- hw/input/virtio-input-hid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 9628d289f9..2cac659469 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -154,6 +154,8 @@ static const unsigned int keymap_button[INPUT_BUTTON__M= AX] =3D { [INPUT_BUTTON_MIDDLE] =3D BTN_MIDDLE, [INPUT_BUTTON_WHEEL_UP] =3D BTN_GEAR_UP, [INPUT_BUTTON_WHEEL_DOWN] =3D BTN_GEAR_DOWN, + [INPUT_BUTTON_SIDE] =3D BTN_SIDE, + [INPUT_BUTTON_EXTRA] =3D BTN_EXTRA, }; =20 static const unsigned int axismap_rel[INPUT_AXIS__MAX] =3D { --=20 2.15.1 From nobody Tue Oct 28 12:14:02 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151395841923793.7043355484459; Fri, 22 Dec 2017 08:00:19 -0800 (PST) Received: from localhost ([::1]:55675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPjv-0006mQ-7w for importer@patchew.org; Fri, 22 Dec 2017 11:00:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSPDL-0003Rf-IU for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSPDK-0001Qf-Nf for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:23 -0500 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:47001) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSPDK-0001Oz-Ft for qemu-devel@nongnu.org; Fri, 22 Dec 2017 10:26:22 -0500 Received: by mail-lf0-x242.google.com with SMTP id r143so31869005lfe.13 for ; Fri, 22 Dec 2017 07:26:22 -0800 (PST) Received: from es.lan (dsl-tkubng22-58c1fd-134.dhcp.inet.fi. [88.193.253.134]) by smtp.gmail.com with ESMTPSA id b75sm4875793lfe.47.2017.12.22.07.26.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2017 07:26:20 -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:in-reply-to:references; bh=QIiBsqzdbYRV5A17xrj5Z3EgQsDup7Udb6fGEDh3YHg=; b=SA5cI6oxRSPv4HvFKzCapyIaHPC54h0dxUqJ6TgRKGngteEHXR/ioTG0Qj27PAZxdO fklPbkVN84oT4BNmiMw2/G99XXllqfTuMhNNsArSUi2hsFX6ge/yEU0GnzgxeLVaeLIW 6xDN+/8JBlX/JnZQgAwm12JRxWWUEQ/opG8jZjRha9Ndp76REx6tSFrEbfap+XcP3evU IzXLD+Un1OuBNEj+sjWe/P0UP1Uy7+Yo79MTlYveiwRbyQYMUlauztRQiXxksHgKJaAd IlDmKPsgfWxltraee5veYI6nk3MDOqpG6/Wu9c4gWab5yPjU8DmqL0j7XF8xHB9J89pO pKfw== 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:in-reply-to :references; bh=QIiBsqzdbYRV5A17xrj5Z3EgQsDup7Udb6fGEDh3YHg=; b=ckdNgY+q4q/WOXoF6o6mA95qoN6EwzNMYzfPnhao8HnAZ+mEeZhMVH3s1KFcNhPw0D P3+LNxL8nGrS2gn0is/3Yt/sGlDrP7dp8MhG+cdcTma8U6YFPaokX8TVF98yCPFgCGUT VoyBc0zIDuuPhExG/fP2z2GemwBRaKrikip4RlioOcW5N4JDN9dd3/GMPI20WQSdco3v p0VYGMtQVlT3VxapxmAA5pZfcB+WHGYbBfT/I14BRs5exlyhLhsc183WRKVh0Y9vI6mO ORVSzFpIfHD7ud6J8cSCmUqOGlNlSsrQeCqiR1dmlAgGxmr7kDFtWLFEpB2rqEBStr7Y ZLaw== X-Gm-Message-State: AKGB3mI85D/SmXChsmDdis9YtJmsGuzwVjHTdftSpf3ZlcJPS1oAh+ov Xjs/sSwkFt7F+tZlBlHlMY46l2I/ X-Google-Smtp-Source: ACJfBotVpig8SZZSHzw2utFvdmv4caYU4DiuCs9pbYWfoHlGa8eFxTpWJBO1Xysw5ZXAIB+JsU6PjA== X-Received: by 10.25.141.74 with SMTP id p71mr9348611lfd.10.1513956380901; Fri, 22 Dec 2017 07:26:20 -0800 (PST) From: Miika S To: qemu-devel@nongnu.org Date: Fri, 22 Dec 2017 17:25:31 +0200 Message-Id: <20171222152531.1849-4-miika9764@gmail.com> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171222152531.1849-1-miika9764@gmail.com> References: <20171222152531.1849-1-miika9764@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::242 Subject: [Qemu-devel] [PATCH 3/3] input: virtio: don't send mouse wheel event twice 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: , Cc: Miika S , kraxel@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" On Linux, a mouse event is generated for both down and up when mouse wheel is used. This caused virtio_input_send() to be called twice each time the wheel was used. This commit adds a check for the button down state and only calls virtio_input_send() when it is true. Signed-off-by: Miika S --- hw/input/virtio-input-hid.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 2cac659469..587616a932 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -225,8 +225,10 @@ static void virtio_input_handle_event(DeviceState *dev= , QemuConsole *src, break; case INPUT_EVENT_KIND_BTN: btn =3D evt->u.btn.data; - if (vhid->wheel_axis && (btn->button =3D=3D INPUT_BUTTON_WHEEL_UP = || - btn->button =3D=3D INPUT_BUTTON_WHEEL_DOW= N)) { + if (vhid->wheel_axis && + (btn->button =3D=3D INPUT_BUTTON_WHEEL_UP || + btn->button =3D=3D INPUT_BUTTON_WHEEL_DOWN) && + btn->down) { event.type =3D cpu_to_le16(EV_REL); event.code =3D cpu_to_le16(REL_WHEEL); event.value =3D cpu_to_le32(btn->button =3D=3D INPUT_BUTTON_WH= EEL_UP --=20 2.15.1