Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2033912lqp; Tue, 16 Apr 2024 05:47:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWQKQ3lGOXys/+MTn74PMgE1FAA/cjt8Be7DuyF9kM8DfriPCW0Sny29N+uwijFj6S61LkhpbIb0o5wh2qcxajCUQrkP++G3+Xo8Kairg== X-Google-Smtp-Source: AGHT+IEKlSbfmTtMKx1mEexoCBTyJOo/ibXeOutWhd+683tSiSyouauxkAFQVjN8Rh8IGpfrtyRK X-Received: by 2002:a05:620a:4398:b0:78a:575b:eca3 with SMTP id a24-20020a05620a439800b0078a575beca3mr15326156qkp.20.1713271668450; Tue, 16 Apr 2024 05:47:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713271668; cv=pass; d=google.com; s=arc-20160816; b=ATz1p5RZygIdoPylp5bsiYqXXGujR/pM1HaI9l1isQgVDSnovUhz5W7Dzbc1f1nK2W 9WRayrk1yydTHLnwdJ+vIP4L76mmz4YkgmgNl6Y9D6lPqGA2UWWeIHOy8dTNQpz9Ppem RlL5ukibm0ta7I8GngT442SeyVTlEkaDeTri798ro5d0X8kockyGXbLYLsVYth/nwn8K n0rxfZK0FFvXmX43+pdBGO+kgNtqscoSm1bxaj8/INDgqOD+6htFU9PZFGVxoheVsqT7 RbqV35iQHDNAM6shGoWNFweGgDnQ06yigdsRLz2IaE0tvyzbGAUbQzMPmPb5Fk0MyF55 uxMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature:dkim-signature; bh=o+A6VQF+YAbnPd55BY98j5+Z/sNjOCmfHE3OGnEzh2o=; fh=Jvh/vzAxtiEWyotZGu0AL0xf0qHCKotx1yCt+AhNeMg=; b=WQiMiCezUSsPW5Qdfk4H60IUCdejHpmdYMjcWH9UJyjPwnZ+K0FICAf/UOta9vdqsm E4LnN1HK5o8zDzZRA8pyozM6IWGElHa14v5RmpAgLLm7pM0h975wRXKBPsDD2RcBN5OW yHo3KM6X85PAJXVtbFmzPa8BjWXbsGwZpnvIEDV/l2nn+v4Cp7nGVmLo9gajJLlOURSg XbVcGr24kPaUpcWYah9rThAwVeLua7GMdTGnlKkIa8jysKY0+nSWnhjcsH0oTBSSwKxl jhUiUahi7P5XTE3Kalx9F09cffZ/JY+m7t3UR7Ck71f2l+pnR6snV0yI61+0NLirnrEE j22Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm3 header.b=Q3XWA1+O; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Q63jmz7S; arc=pass (i=1 spf=pass spfdomain=squebb.ca dkim=pass dkdomain=squebb.ca dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-146817-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146817-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bq39-20020a05620a46a700b0078eca5876f9si11616347qkb.379.2024.04.16.05.47.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 05:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146817-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@squebb.ca header.s=fm3 header.b=Q3XWA1+O; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=Q63jmz7S; arc=pass (i=1 spf=pass spfdomain=squebb.ca dkim=pass dkdomain=squebb.ca dkim=pass dkdomain=messagingengine.com); spf=pass (google.com: domain of linux-kernel+bounces-146817-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146817-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 223B31C2163E for ; Tue, 16 Apr 2024 12:47:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E10B12BEB8; Tue, 16 Apr 2024 12:47:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b="Q3XWA1+O"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Q63jmz7S" Received: from fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF9BF6BFDD; Tue, 16 Apr 2024 12:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271660; cv=none; b=XHdbUR0geq1fqdPgkGDvQRjxc+8fjPd7HE2XiH/FQsq3KYoZ/1Wv7CblVG7RoaN9vbfopp8U+lkrakQkoK0n8qUptaJ0LZTBlx3rqZVXXd/7n2R3biKaM0x7M+SdNuwaqmCCsVBAlnBx2IMJxFlUDiVDFzqSqFlCCl4o6qqFUG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713271660; c=relaxed/simple; bh=y+/Ebc9cDomP+Us9Son9nxZv+MjrLNi2Me6BEVjA3Xg=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=brfZu1+5j76ZgTOIruLAtU74PyalROgyyNj4e4TOPgygH+5fpE5e459/nIbeN3Rp35zAhZUxYP+LX2JI0NXHaouEvMONnSdr5hEBmeC4gtK3FuN7F8RwwzjReI8ZpZ4foTdGCYi5rOz3KBcp/nL0PC1D5ZgEtk/01G3982C7kS8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squebb.ca; spf=pass smtp.mailfrom=squebb.ca; dkim=pass (2048-bit key) header.d=squebb.ca header.i=@squebb.ca header.b=Q3XWA1+O; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Q63jmz7S; arc=none smtp.client-ip=103.168.172.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=squebb.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=squebb.ca Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id C7FAA13806EC; Tue, 16 Apr 2024 08:47:36 -0400 (EDT) Received: from imap52 ([10.202.2.102]) by compute3.internal (MEProxy); Tue, 16 Apr 2024 08:47:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1713271656; x=1713358056; bh=o+A6VQF+YA bnPd55BY98j5+Z/sNjOCmfHE3OGnEzh2o=; b=Q3XWA1+OY/HWHYR1BQtn2qUTwQ xtT9OgbDT3BR8cSHAJUORD8mBmJAWIpxV/eOneMCCwOXn5kotlZygOEQz0LibU/Y R+Yl0wL4GYNr0nW1Hn3GMMeRABQ49Cv8nOVBo9A+lr+PhRbih2Cj+39PyIXTqnaT Q/U/432UW6u3q6DiRQewWPZZZumLUZebYwr62fSp7z88gh+jSFcrU0wG6ZFLbvn2 YLfbfHD51luXvnYmuzT6JV5dO5VtaEglxLqBQ3dEbPFXRxISFx65ep0+44HD6OqB ScY+BGxq+xOP08kbMQlWF9ea7B71cnJKgPJbdNTZEr1vb22CFMskwkOn/m2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1713271656; x=1713358056; bh=o+A6VQF+YAbnPd55BY98j5+Z/sNj OCmfHE3OGnEzh2o=; b=Q63jmz7SYl461WydOQDvdyrROqIe9K0Yg+Nrt/NTUuja hdBx7uD200mJLSYpZG4cTXV42RGVBkp8pARiI7wL3xlXmJopSQHuXbMVB90Z5PZC kVrbiQhIN+quX9Dimdt1c+28yiQrAH/dJ4wi0vxBXq2XZsD8ugA+IwdgWvpLSk28 gn0djxsUqbheeyQDXm1Co1ARyjRFbSM4dY9438KowKRaOtSAa0W+LoA7LoFlpPrh n5duoMnRwZTOOTCuolasLzuyw7y4SddeIYUC4wOT3hebWp8CDSwNWB49aPZx3+ny XHuKhRejLFDaLQAVDb3EX/mOwSBf+/CObCj91KElbQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejhedgfeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsehttdertderredtnecuhfhrohhmpedfofgr rhhkucfrvggrrhhsohhnfdcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssg drtggrqeenucggtffrrghtthgvrhhnpeeiueefjeeiveetuddvkeetfeeltdevffevudeh ffefjedufedvieejgedugeekhfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 190A4C60097; Tue, 16 Apr 2024 08:47:35 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-379-gabd37849b7-fm-20240408.001-gabd37849 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: In-Reply-To: <27b1b6cf-759c-4778-a53c-5d01442120b7@redhat.com> References: <92ee5cb2-565e-413c-b968-81393a9211c4@app.fastmail.com> <91593303-4a6a-49c9-87a0-bb6f72f512a1@app.fastmail.com> <484638e2-1565-454b-97f8-4fcc6514a69c@redhat.com> <539776c5-6243-464b-99ae-5b1b1fb40e4b@app.fastmail.com> <7de52ec3-86f3-4a1d-ac87-a106ae1acb5d@app.fastmail.com> <27b1b6cf-759c-4778-a53c-5d01442120b7@redhat.com> Date: Tue, 16 Apr 2024 08:48:31 -0400 From: "Mark Pearson" To: "Hans de Goede" , "Dmitry Torokhov" Cc: "Peter Hutterer" , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , "Henrique de Moraes Holschuh" , ibm-acpi-devel@lists.sourceforge.net, "platform-driver-x86@vger.kernel.org" , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, "Nitin Joshi1" , "Vishnu Sankar" Subject: Re: [PATCH 1/4] Input: Add trackpoint doubletap and system debug info keycodes Content-Type: text/plain Hi Hans On Tue, Apr 16, 2024, at 4:33 AM, Hans de Goede wrote: > Hi Mark, > > On 4/16/24 1:57 AM, Mark Pearson wrote: >> Hi Dmitry, >> >> On Mon, Apr 15, 2024, at 6:54 PM, Dmitry Torokhov wrote: >>> On Mon, Apr 15, 2024 at 04:28:19PM -0400, Mark Pearson wrote: >>>> Hi >>>> >>>> On Mon, Apr 15, 2024, at 3:58 PM, Dmitry Torokhov wrote: >>>>> On Mon, Apr 15, 2024 at 09:50:37PM +0200, Hans de Goede wrote: >>>>>> Hi, >>>>>> >>>>>> On 4/15/24 9:40 PM, Dmitry Torokhov wrote: >>>>>>> On Wed, Apr 10, 2024 at 10:48:10PM -0400, Mark Pearson wrote: >>>>>>>> >>>>>>>> I have a stronger preference to keep the KEY_DOUBLECLICK - that one seems less controversial as a genuine new input event. >>>>>>> >>>>>>> Please see my response to Peter's letter. I think it very much depends >>>>>>> on how it will be used (associated with the pointer or standalone as it >>>>>>> is now). >>>>>>> >>>>>>> For standalone application, recalling your statement that on Win you >>>>>>> have this gesture invoke configuration utility I would argue for >>>>>>> KEY_CONFIG for it. >>>>>> >>>>>> KEY_CONFIG is already generated by Fn + F# on some ThinkPads to launch >>>>>> the GNOME/KDE control center/panel and I believe that at least GNOME >>>>>> comes with a default binding to map KEY_CONFIG to the control-center. >>>>> >>>>> Not KEY_CONTROLPANEL? >>>>> >>>>> Are there devices that use both Fn+# and the doubleclick? Would it be an >>>>> acceptable behavior for the users to have them behave the same? >>>>> >>>> Catching up with the thread, thanks for all the comments. >>>> >>>> For FN+N (originally KEY_DEBUG_SYS_INFO) the proposal was to now use >>>> KEY_VENDOR there. My conclusion was that this is targeting vendor >>>> specific functionality, and that was the closest fit, if a new keycode >>>> was not preferred. >>> >>> Fn+N -> KEY_VENDOR mapping sounds good to me. >>> >>>> >>>> For the doubletap (which is a unique input event - not related to the >>>> pointer) I would like to keep it as a new unique event. >>>> >>>> I think it's most likely use would be for control panel, but I don't >>>> think it should be limited to that. I can see it being useful if users >>>> are able to reconfigure it to launch something different (browser or >>>> music player maybe?), hence it would be best if it did not conflict >>>> with an existing keycode function. I also can't confirm it doesn't >>>> clash on existing or future systems - it's possible. >>> >>> So here is the problem. Keycodes in linux input are not mere >>> placeholders for something that will be decided later how it is to be >>> used, they are supposed to communicate intent and userspace ideally does >>> not need to have any additional knowledge about where the event is >>> coming from. A keyboard either internal or external sends KEY_SCREENLOCK >>> and the system should lock the screen. It should not be aware that one >>> device was a generic USB external keyboard while another had an internal >>> sensor that recognized hovering palm making swiping motion to the right >>> because a vendor decided to make it. Otherwise you have millions of >>> input devices all generating unique codes and you need userspace to >>> decide how to interpret data coming from each device individually. >>> >>> If you truly do not have a defined use case for it you have a couple >>> options: >>> >>> - assign it KEY_RESERVED, ensure your driver allows remapping to an >>> arbitrary keycode, let user or distro assign desired keycode to it >>> >>> - assign KEY_PROG1 .. KEY_PROG4 - pretty much the same - leave it in the >>> hand of the user to define a shortcut in their DE to make it useful >>> >>>> >>>> FWIW - I wouldn't be surprised with some of the new gaming systems >>>> we're seeing (Steamdeck, Legion-Go, etc), that a doubletap event on a >>>> joystick might be useful to have, if the HW supports it? >>> >>> What would it do exactly? Once we have this answer we can define key or >>> button code (although I do agree that game controller buttons are >>> different from "normal" keys because they map to the geometry of the >>> controller which in turn defines their commonly understood function). >>> >>> But in any case you would not reuse the same keycode for something that >>> is supposed to invoke a configuration utility and also to let's say >>> drop a flash grenade in a game. >>> >> >> Understood. >> >> I don't see a path forward within your stated parameters. I did not realise that there were such limitations, so my apologies for wasting everybody's time, and thank you for your patience and guidance. >> >> I will drop this patch from the series and proceed using existing defined codes only. >> >> Hans, I'll need to rejig things a bits but I have some ideas and I think I can make it work and stay within the pdx86 tree, which will make it simpler. > > Ok this sounds good to me. For Fn + N using KEY_VENDOR sounds good for > me and for the doubletap any one of > KEY_CONFIG/KEY_CONTROLPANEL/KEY_INFO/KEY_PROG1 > or some other suitable KEY_foo define works for me. > I think this should be a configurable input, by design. So my preference (if not allowed a new keycode, which I personally think is the better option) is for PROG1. I discussed with Peter last night and it looks likely OK on their side. I do plan on doing some testing first, so it might take a few days to get the next set of patches out. Mark