From patchwork Wed May 3 03:47:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Jones X-Patchwork-Id: 13229472 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C10B6C77B78 for ; Wed, 3 May 2023 03:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229586AbjECDry (ORCPT ); Tue, 2 May 2023 23:47:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjECDrs (ORCPT ); Tue, 2 May 2023 23:47:48 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 066F33C14; Tue, 2 May 2023 20:47:46 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1801D3200B88; Tue, 2 May 2023 23:47:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 02 May 2023 23:47:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1683085664; x= 1683172064; bh=qJF/y3PUtn5/2JZtl7kI9dJefyoiVSOcY3IKgthNpIc=; b=z ySnQ1rBAnzidl6iL0pwfcaV7q1BhJw7K8Z7Gnxg+eWmliFMapKVb5x4C5tMnYIeI cGCvsTxLAV4Bxi5DuvP60YET7SQYI0Cve51cwXF5DOypi9VECATBXGq9KEatcUHY Oe1WT9JwIBJBMwx8opbIxeSA4xSniYADfOiQaMKp1LxcbngPLEvlJ0HW07C++HJp 6ihMgw5X8VwpBEu8uWbrz5JXf6xX3ZENWQZXh+fTshrLedsGzStgwCXFya/GiO0w Cjcunb7cz5X9Qpjf2pQoH3ZLjzIH3VFz7z1jbz1roJjErX48qq3qqeCfTyVs15Wu bMJq8bTP7KlzYUzutz+YQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1683085664; x= 1683172064; bh=qJF/y3PUtn5/2JZtl7kI9dJefyoiVSOcY3IKgthNpIc=; b=F q4CSQVoiVKJBh109TYziJStlzxq1sjjUmGriCCBd38wb9kuFlkd3E08E4XGFhfZ9 NYbVWIIpEmBmEupXYwGoF4Q7hjROkHISgaGAF38xDJTv+lIVVusS4qvj2SBY16vH m4ncYsmRxv88s/Eyv3CtKaiMAlWoc9t2cIqybsZDmNgF11IJ60a/3nA4XGx9wvNA xsi+1H0eEN0SR0cNSSsstVdOVWwbTIhYEh1IJaqg6XaJUSimuoeVDAZQJw/ulWaY SedOObQrBG48FFcktNmyIj8GGzBCvgSLAM6P+QrKm8RDUs6RPZV/LufLMJCDZ9Vn P3/rM+MNEKyAdVOXcHPgg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvjedgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehl jhhonhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfetfedugfetudeuheetjefhue fggfelleetvdevtefhueeujeefvdegleevhefgnecuvehluhhsthgvrhfuihiivgepuden ucfrrghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 May 2023 23:47:41 -0400 (EDT) From: "Luke D. Jones" To: linux-input@vger.kernel.org Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, rydberg@bitmath.org, linux-kernel@vger.kernel.org, "Luke D. Jones" Subject: [PATCH 3/3] HID: asus: reformat the hotkey mapping block Date: Wed, 3 May 2023 15:47:11 +1200 Message-Id: <20230503034711.253439-3-luke@ljones.dev> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230503034711.253439-1-luke@ljones.dev> References: <20230503034711.253439-1-luke@ljones.dev> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Older formatting of this block was beginning to get somewhat cluttered. Condensing the block and putting comments to the side makes it easier to read and scan the scancodes plus keycodes. Signed-off-by: Luke D. Jones --- drivers/hid/hid-asus.c | 44 ++++++++++++------------------------------ 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 918d0d05ca88..2bc14e076739 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -885,38 +885,18 @@ static int asus_input_mapping(struct hid_device *hdev, case 0xc5: asus_map_key_clear(KEY_KBDILLUMDOWN); break; case 0xc7: asus_map_key_clear(KEY_KBDILLUMTOGGLE); break; - /* ASUS touchpad toggle */ - case 0x6b: asus_map_key_clear(KEY_F21); break; + case 0x6b: asus_map_key_clear(KEY_F21); break; /* ASUS touchpad toggle */ + case 0x38: asus_map_key_clear(KEY_PROG1); break; /* ROG key */ + case 0xba: asus_map_key_clear(KEY_PROG2); break; /* Fn+C ASUS Splendid */ + case 0x5c: asus_map_key_clear(KEY_PROG3); break; /* Fn+Space Power4Gear */ + case 0x99: asus_map_key_clear(KEY_PROG4); break; /* Fn+F5 "fan" symbol */ + case 0xae: asus_map_key_clear(KEY_PROG4); break; /* Fn+F5 "fan" symbol */ + case 0x92: asus_map_key_clear(KEY_CALC); break; /* Fn+Ret "Calc" symbol */ + case 0xb2: asus_map_key_clear(KEY_PROG2); break; /* Fn+Left previous aura */ + case 0xb3: asus_map_key_clear(KEY_PROG3); break; /* Fn+Left next aura */ + case 0x6a: asus_map_key_clear(KEY_F13); break; /* Screenpad toggle */ + case 0x4b: asus_map_key_clear(KEY_F14); break; /* Arrows/Pg-Up/Dn toggle */ - /* ROG key */ - case 0x38: asus_map_key_clear(KEY_PROG1); break; - - /* Fn+C ASUS Splendid */ - case 0xba: asus_map_key_clear(KEY_PROG2); break; - - /* Fn+Space Power4Gear Hybrid */ - case 0x5c: asus_map_key_clear(KEY_PROG3); break; - - /* Fn+F5 "fan" symbol on FX503VD */ - case 0x99: asus_map_key_clear(KEY_PROG4); break; - - /* Fn+F5 "fan" symbol on N-Key keyboard */ - case 0xae: asus_map_key_clear(KEY_PROG4); break; - - /* Fn+Ret "Calc" symbol on N-Key keyboard */ - case 0x92: asus_map_key_clear(KEY_CALC); break; - - /* Fn+Left Aura mode previous on N-Key keyboard */ - case 0xb2: asus_map_key_clear(KEY_PROG2); break; - - /* Fn+Right Aura mode next on N-Key keyboard */ - case 0xb3: asus_map_key_clear(KEY_PROG3); break; - - /* Screenpad toggle on N-Key keyboard */ - case 0x6a: asus_map_key_clear(KEY_F13); break; - - /* Arrows/Page-up/Down toggle on N-Key keyboard */ - case 0x4b: asus_map_key_clear(KEY_F14); break; default: /* ASUS lazily declares 256 usages, ignore the rest, @@ -1319,4 +1299,4 @@ static struct hid_driver asus_driver = { }; module_hid_driver(asus_driver); -MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL"); \ No newline at end of file