From patchwork Wed May 3 03:47:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Jones X-Patchwork-Id: 89553 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1056164vqo; Tue, 2 May 2023 20:49:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7yYPwCLVlEmz160Y1TVMnnhnq66L8szxIoxBjdOUJUXj20yrLnBL+N/pxIEtZZAfVU2y2M X-Received: by 2002:a05:6a00:2408:b0:63f:37b8:655 with SMTP id z8-20020a056a00240800b0063f37b80655mr25319357pfh.20.1683085781688; Tue, 02 May 2023 20:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683085781; cv=none; d=google.com; s=arc-20160816; b=ZU93pKLkuVaekTyVYMXL2H77vl3DVQUrQZnOjagR2yY6N+r/smMEbFFyYj7eWEK8IG 1Z0ZpYw8PrDFGQBfBqFRoL6UgHd4ahNxSMMgf8Bkq1SOMbsvVMYXQtr4aL7tV3Fz9rdP yAo5BC8DQTYgkQBFvNuJtQOIgWNxENs/t1gnjcDnNemxPUNKMAqYtK0WBIukFgUvqLhX m7Ga/LrF87VXOdA3yIAD2bl17NAm4RLRqy41Uv/VNmczvDtPX8uuEoo0pODof0ug2mec xH2kmgREWHut7ZNSf6jBGCCEHavR92ao2XNEzzHguZnKmgnybmkxSjG2wDLonEldpCoY 3log== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=V/d/3EsAUutJ/zE1JIkDiyrgpJXuHYYJg8L0EWtFynU=; b=wmDQVa314wdtnniu+CXa7kN2a/DwAGga1mFMSo9c/olWRzVjDuQb/2KU+cUSyzO+aG F55JVXMhSk3fD43uCCd5uzFznY1JlW4BaIthJxpnHG7k9hvzk8T2zR+Z66a5fU0C/SvD NsoAuthv3/+SCX+HfDpQ1UPau0f+Fxwdjv5StqHcHjIYEstynQxNDV6ptj5Oaj0wyX+f kaI/wz9FcfCwNd4HXQGLSooB/AqXMmu3qeNZZl+f7XF/ESDizo+t1RH1Ek3/6URdpa+b aJs2aTuyfMD/CQx8JYM7aw22H7g594lfaQTUc0CmGEIl/b0ytZtjfrvi9relipIJrX7x x8cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b="gCJbXru/"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dfWYp3Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x29-20020aa7957d000000b00624eb57b45dsi31971278pfq.74.2023.05.02.20.49.29; Tue, 02 May 2023 20:49:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b="gCJbXru/"; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=dfWYp3Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229559AbjECDrg (ORCPT + 99 others); Tue, 2 May 2023 23:47:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjECDre (ORCPT ); Tue, 2 May 2023 23:47:34 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14AC82683; Tue, 2 May 2023 20:47:33 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 1FFD13200B83; Tue, 2 May 2023 23:47:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 02 May 2023 23:47:32 -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:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm1; t=1683085651; x=1683172051; bh=V/d/3EsAUu tJ/zE1JIkDiyrgpJXuHYYJg8L0EWtFynU=; b=gCJbXru/26p0OFK/4+NzCBhVdo xJbP0QoYLpejtW1zZOmhAHbKibz6qBFPbOa7QrdF8dzzDbhPPXGH8UlKs8gMhl9F 7q2IE0YjDLycq+3DnMq5jPolyMZ2TUOhntl9wUMohCT0oDXQVCbXyvRn3LgTp39e bQ0xqn3XfqZnYofss3F59UODL6qNJaj4Lx3mGvQbsf+4rzaVVJjCsxUxps5Y/e55 uhKH+v/blGqW3VMWYZrWDAqsnP/l4ZY905zZa2Z8VDNMox8lXqIdikh/WlBeBEqq nu0EOX8mr9aaoSt93z4sK0RWvQr4jmbpMbaR8AzCR7Wb79lWRC0Uyau8KDbw== 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:message-id:mime-version: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=1683085651; x=1683172051; bh=V/d/3EsAUutJ/ zE1JIkDiyrgpJXuHYYJg8L0EWtFynU=; b=dfWYp3WmDiJGciJ46jC2WrnAKwNcP mnSMy3XkPZ4uiRilU3Es4nZVHKa2usUqymbrO4CSdjoXYWLxt1FNIs/JFNuLsh// 575I/trxL2CLuS3WJxoAMtRgfMB3ltGufSGicCcZ5M4gYLY6EBtDvtIPtJEgsEPC dmoWl4LymMYNC3suQUdiWhg1fFGznxyFREYmjC/jlgJFi6asc+auflOMimtoM+uv vFyD52fh17dme9WBWqLT+A2ss0H7z3rBBhZlWeDpnN8AtnVpOzheu/IHUQAnQOEB YvNL2Oe59KIfIOMmt6PiLKB0kNKwCDjSH8WX+UqAx1CncoNO34DgFoLoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvjedgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehljhho nhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfdujedthfduudekffefkeeiffdttd dvhfegudduueffuefhfefggeefteevvdegnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 May 2023 23:47:28 -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 1/3] HID: asus: Add support for ASUS ROG Z13 keyboard Date: Wed, 3 May 2023 15:47:09 +1200 Message-Id: <20230503034711.253439-1-luke@ljones.dev> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764843356743267899?= X-GMAIL-MSGID: =?utf-8?q?1764843356743267899?= Add support for the ROG Z13 keyboard. This is a variant of the last few ASUS ROG keyboards and has much of the same functionality. Signed-off-by: Luke D. Jones --- drivers/hid/hid-asus.c | 3 +++ drivers/hid/hid-ids.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index d1094bb1aa42..ac93f987d822 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -1267,6 +1267,9 @@ static const struct hid_device_id asus_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD2), QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD }, + { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, + USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD3), + QUIRK_USE_KBD_BACKLIGHT | QUIRK_ROG_NKEY_KEYBOARD }, { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_CLAYMORE_II_KEYBOARD), QUIRK_ROG_CLAYMORE_II_KEYBOARD }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index c2e9b6d1fd7d..513290a2e91c 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -207,6 +207,7 @@ #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822 #define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD 0x1866 #define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD2 0x19b6 +#define USB_DEVICE_ID_ASUSTEK_ROG_NKEY_KEYBOARD3 0x1a30 #define USB_DEVICE_ID_ASUSTEK_ROG_CLAYMORE_II_KEYBOARD 0x196b #define USB_DEVICE_ID_ASUSTEK_FX503VD_KEYBOARD 0x1869 From patchwork Wed May 3 03:47:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luke Jones X-Patchwork-Id: 89554 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1056608vqo; Tue, 2 May 2023 20:51:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ50coth2F9ODCG9/PF01FEqY0o1cJgMQlet37FLxIx5QBVa6TYXV0JWEVoLcrrIBUSmto/4 X-Received: by 2002:a05:6a21:32a6:b0:f0:972e:e586 with SMTP id yt38-20020a056a2132a600b000f0972ee586mr25632267pzb.18.1683085874471; Tue, 02 May 2023 20:51:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683085874; cv=none; d=google.com; s=arc-20160816; b=L2pbIvvZSGCr5l5qDWpn0p5tSLGqRDDJ+MAJwFwORSU7LoR1svw+kvizUlI3OkKGVB Lcd5rcGaWkbhFs/RZamLQrmmdGaqB5Kru6ofUXZNLhECn9daGB0qL78HIaNUP9TwI6Ez fmivEMDsFGH8uyp8//P8LaV9b4AxE42PiQ4q4w9FaLqeyxzXB9DR18JR1AjQNYjwI1vB ZOYLwFlD6w3QlRQfOcL1ia/3Mp3iNA/Hz4DNs70u+x4eh/vEozcqw6j9pqM1eMlkMR6b QHiZLAmcpqAuy4nZqN1vi4qCDMkpPhIlM6rFt93gIvlVoCobUPJNuKV2j+K/lJLJtOb9 +aag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=GE4ZZwE36FI7n9XRr0c3ku1bZdvpZHi3wyNYWI2WMCQ=; b=IBbnrsXz23TUc6qGbud8pRfegsuGLtduKbsVfJrexT+CmmZbbmZ3zi9VnUis8dqVmU iwaR4C8C1tvfWvcQ5etrczBXcnekuDyHeXY5YIxfZUVieseLhzZb5rxbQgMwwBBwShDL X9UsFyh04+t2KWpaGZWMzZuxatZGufTyeDbc8ygs2t5amC5W/vio3pO8fD1ZJXbtpJvS wrfbBcwATBFYdD6UBWgR9NFkJIv3gVQDfGsJBxi4E2C3Vy4G7DJAqRmCGCJUn7vJ0mQE anT0j9agp6Pc2j+CysxXpGWdoWBJlrJYz+lw0haSApPHEvvIRe3duc1UlDvQqHPL+Nwi S2iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b=AFRFP6Bx; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=UnnF2LAh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q14-20020a63d60e000000b005032da21acasi32237356pgg.204.2023.05.02.20.51.01; Tue, 02 May 2023 20:51:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b=AFRFP6Bx; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=UnnF2LAh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229565AbjECDro (ORCPT + 99 others); Tue, 2 May 2023 23:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbjECDrk (ORCPT ); Tue, 2 May 2023 23:47:40 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 441E22D69; Tue, 2 May 2023 20:47:39 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5ABCF3200B89; Tue, 2 May 2023 23:47:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 02 May 2023 23:47:38 -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=1683085657; x= 1683172057; bh=GE4ZZwE36FI7n9XRr0c3ku1bZdvpZHi3wyNYWI2WMCQ=; b=A FRFP6BxEze6wYlk3J8FeRGTYFL8op0e4dFva7u2Sr/xhk0CBXtIW+0YL8NJ9l3Cl tOBlWdeM4H16kTrE55I+vNHzjwcLUDV5Mq61zDlzYNtsnNG/I2TtOufxj3sISNAe 4RYIiIBoAM0pFR07izAB+ff9I4+qcB1Sg5QDsPLF9lMR302dbQzVEU65vGMvaUdN PcDyVne7e0TbBcQbncpoSqZ2Kx4OWK+vVhTe0yPJle6yiuzch3Q7X51chtIFWX8c ZiNqW3kJ+DXs2GSIICt9Ox+gzM83Eexcg/KuxaCko8zGmgNI/LFlSJWuo1wbhMrI Iz8SUwPT9bYLPm0H24rbA== 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=1683085657; x= 1683172057; bh=GE4ZZwE36FI7n9XRr0c3ku1bZdvpZHi3wyNYWI2WMCQ=; b=U nnF2LAhzcWqFi/RWguKVR29vq6Vxd6svdqLPb5xLuPbJFVmpg1lyMXS+dycc5z+1 ZlYadwGgA3UnfVQ7UVkVvq0F3QXpmHYdkmBTEe1qzsUELD+/lQ7BsxSQS8cQyLac btTmxk1+V+dGVMFZ8XezgmVlppZMZgrlELxxl7GGPGMZowBYPaYAQ/41BG70q3qz fn6HmZV6kbAhwRNpkdMHem8vRe5sjCgNfbqGAGbbfEQMntUC8VDMbCvOaGwQhCkk 5IdFuk/2OVBsdbuMNOlZ+a6Er6CR6E28CdbowupITIMLUUVQpmkO+hjxqlqDJTaL M/vb+FEEg0FdZQXm/s/4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedvjedgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke ertdertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehl jhhonhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfetfedugfetudeuheetjefhue fggfelleetvdevtefhueeujeefvdegleevhefgnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh X-ME-Proxy: Feedback-ID: i5ec1447f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 2 May 2023 23:47:35 -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 2/3] HID: asus: add keycodes for 0x6a, 0x4b, and 0xc7 Date: Wed, 3 May 2023 15:47:10 +1200 Message-Id: <20230503034711.253439-2-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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764843453844440653?= X-GMAIL-MSGID: =?utf-8?q?1764843453844440653?= These two keys are found on some models with dual display. - 0x6a is intended for controlling the secondary screen brightness. - 0x4b is intended for toggling the arrow keys between arrows and page up / page down. This key is found on a slightly modified keyboard layout. - 0xc7 is intended to cycle through keybvoard brightnesses (upwards) but there is not suitable existing code for this behaviour. Using `KEY_KBDILLUMTOGGLE` is different behaviour to Windows but at least is picked up by many desktops already. Signed-off-by: Luke D. Jones --- drivers/hid/hid-asus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index ac93f987d822..918d0d05ca88 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -883,6 +883,7 @@ static int asus_input_mapping(struct hid_device *hdev, case 0xb5: asus_map_key_clear(KEY_CALC); break; case 0xc4: asus_map_key_clear(KEY_KBDILLUMUP); break; 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; @@ -911,6 +912,12 @@ static int asus_input_mapping(struct hid_device *hdev, /* 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, * as some make the keyboard appear as a pointer device. */ 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: 89555 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1057350vqo; Tue, 2 May 2023 20:54:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5gcRDHH/XJS0ozRKGgGCxAPabImVfQr7x7XZkNjGUN7nopYyrxDxCPhtVXkde5UZBuzgZ/ X-Received: by 2002:a17:90a:4417:b0:24d:e923:e9f9 with SMTP id s23-20020a17090a441700b0024de923e9f9mr10946725pjg.11.1683086044233; Tue, 02 May 2023 20:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683086044; cv=none; d=google.com; s=arc-20160816; b=Kuq/wSrxlrvc7rvi0cHSncG2oVnsgGZJwrP5fUUB8Qn4BuxOp9RBY1tVm/o/GlJ+oP PFDtnWFmJmdl+a8FcfulbDnlPQVkZ3i7ntssmIV3eQlzJmkQcPk2LS9tynRq37PMsIUS JVXM5Qpeb1D3zeUt7OYlNhXvnz0DHMmW7mjF+lwlcVkdA3Au72G3vgrnzbRDlSPjmFHh fUa5C/6G+KaCTPMi8lQA7oYL0uzX8Q1MJHdfJc3SzGFTxFzXH2jg8RuGeIZRhLyC1wwX 0QWEX2K0ernko+CN2Ix1BFMB3cmaq2IBgH2vkCCMX4mHBdhyp1SoT/MtyIhAjIL7d0QQ 1fKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :feedback-id:dkim-signature:dkim-signature; bh=qJF/y3PUtn5/2JZtl7kI9dJefyoiVSOcY3IKgthNpIc=; b=B4X3cMB/dcGY41nsCi9VQ/SyyfeutyUmIoqVPjnQBUPHURR4ahCszT6yOgV31I70MK lrkFY0X5xyRju1VZ+N7E5zGgwEDSQFd8ZyYnHTtVvhAcztv1cPW05QzCCPOYSplm1fHL 4chUJKjbBTyI0LOKfUmgWkQEF+Knh6uvgcDh/T66CSqpILupOY+ZQVjNSWthCSNrRp6w y3nYBdQ3RJrwBLBrmw7MOZj04fOjJLMdOwjfWDvo+Ewh2+ZIMPrXwMMN2qPdHTlF8VaR L9N4lIg8WDubz4u5GvVgLh3Uo36X/hBr5bmowLylBXIBzCuEMqacO0qc+r2Mn5iq2ppu E5YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b=zySnQ1rB; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Fq4CSQVo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa12-20020a17090b1bcc00b0023b481b8dcesi665813pjb.102.2023.05.02.20.53.51; Tue, 02 May 2023 20:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ljones.dev header.s=fm1 header.b=zySnQ1rB; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=Fq4CSQVo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229464AbjECDr4 (ORCPT + 99 others); Tue, 2 May 2023 23:47:56 -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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764843631844286383?= X-GMAIL-MSGID: =?utf-8?q?1764843631844286383?= 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