Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4537923rwd; Tue, 30 May 2023 06:51:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ43NDgq0ROLv76y1JCUMvg1cMVLuW7OwchbfqxMBt2+emvYPOuL1yaOVu/AUaAZTiQAgPpy X-Received: by 2002:a05:6a20:158d:b0:10a:f3df:b86e with SMTP id h13-20020a056a20158d00b0010af3dfb86emr2723023pzj.44.1685454670881; Tue, 30 May 2023 06:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685454670; cv=none; d=google.com; s=arc-20160816; b=ICn5dpy3bC45i6qT+rBqUWPJiCnc7dRfic1NQrbv2S/pbKuQej0W77W3ugjc/pjDLF 4tlwHd7Z+MYkrIovWEM9HcpLsH9Tu4e9m1IwMuPaZzFirL/WSxwM/VQQ7AJ2X5d3oW9s VdfbVB93PWNxLrnMiq6bm5PemFRBcibMyh9B+LTWiagJYL/BK12wdJjuxLU4NGJXy5y2 9iFw0TABuF+fcY6DtPhBhjwb7RrcHVcuGM03VvUMx2qAldd1xlVHh4di4HbfCBLcCbB2 J20ySmMVgpamsVU97cIW4BHdgEi1O4v+sbbOiJZzduZvwkb3kz0YCe0tBCdb9uKE21/6 4WGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=kkq3F+4mDIEfA12rX1+j53Q/zKtrtzekTdZRJFvbHNM=; b=Yq6bbxPXP7nKWTTsDLZ6dmHTREmZA1VdRzaebV07wsgw7pfo5nUQN/BZPxr4/ozPHD cLBPxm0sKrhmEMqILP/ULJse5b3bws4B+FU89SXO6pUWeArs5WXMD4Hu7E7aOeecyNoa n9jWG+ix7bn4407c/ipTV5KmvsqOrewcQGYbCrQ8cmao1KoTHd4He51Km9ED4LYDM0hG QPDzKXg4itbbyUi0iiLtZfhYSrtsP/flvPgFbso5Lonl8W8frhV5/64Mi7PmxICwTyov 5gDzf6K8EYJPdzasnyHacEUK3yi2l1aECGXPucSgOHG9wU6cx8RfixHmWRPvSLf0Fp0M oYIA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h25-20020a633859000000b0053b88e08e85si11000338pgn.242.2023.05.30.06.50.55; Tue, 30 May 2023 06:51:10 -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; 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 S232341AbjE3Ndc convert rfc822-to-8bit (ORCPT + 99 others); Tue, 30 May 2023 09:33:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbjE3Nd3 (ORCPT ); Tue, 30 May 2023 09:33:29 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F01E1F0; Tue, 30 May 2023 06:33:27 -0700 (PDT) X-GND-Sasl: hadess@hadess.net X-GND-Sasl: hadess@hadess.net X-GND-Sasl: hadess@hadess.net X-GND-Sasl: hadess@hadess.net Received: by mail.gandi.net (Postfix) with ESMTPSA id 2DF431C0013; Tue, 30 May 2023 13:33:25 +0000 (UTC) Message-ID: Subject: Re: [PATCH] input: Add new keyboard backlight control keys to match modern notebooks From: Bastien Nocera To: Werner Sembach , Dmitry Torokhov Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 30 May 2023 15:33:25 +0200 In-Reply-To: <20230530110550.18289-1-wse@tuxedocomputers.com> References: <20230530110550.18289-1-wse@tuxedocomputers.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.48.0 (3.48.0-1.fc38) MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Tue, 2023-05-30 at 13:05 +0200, Werner Sembach wrote: > The old three KEY_KBDILLUM* keycodes don't reflect the current > situation > modern notebooks anymore. Especially the ones with RGB keyboards. > > e.g. > - Clevo NL50NU has a toggle, an up, a down and a color-cycle key > - TongFang PH4ARX1 doesn't have a toggle key, but one that cycles > through >   off, half-brightness, and full-brightness. > > Also, on some devices these keys are already implemented in firmware. > It > would still be nice if there is a way to let userspace know when one > of > these keys is pressed to display the OSD, but don't advice it to > actually > do anything. This is the intended purpose of the KEY_KBDILLUMCHANGE > define. > > Signed-off-by: Werner Sembach Can you please point to the user-space patches (or issues filed) that would integrate the support for those keycodes, and make the key presses do something? Has anyone tested that those keycodes are fit for purpose when mixed with other brightness changes that don't happen through key presses? > --- >  include/uapi/linux/input-event-codes.h | 4 ++++ >  1 file changed, 4 insertions(+) > > diff --git a/include/uapi/linux/input-event-codes.h > b/include/uapi/linux/input-event-codes.h > index 022a520e31fc2..05287bf9a77f7 100644 > --- a/include/uapi/linux/input-event-codes.h > +++ b/include/uapi/linux/input-event-codes.h > @@ -803,6 +803,10 @@ >  #define BTN_TRIGGER_HAPPY39            0x2e6 >  #define BTN_TRIGGER_HAPPY40            0x2e7 >   > +#define KEY_KBDILLUMCYCLE              0x2e8 > +#define KEY_KBDILLUMCOLORCYCLE         0x2e9 > +#define KEY_KBDILLUMCHANGE             0x2ea > + >  /* We avoid low common keys in module aliases so they don't get > huge. */ >  #define KEY_MIN_INTERESTING    KEY_MUTE >  #define KEY_MAX                        0x2ff