Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2865607pxb; Fri, 5 Nov 2021 06:05:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYrom5LB5SzmI+Hf3zI8PK1wpkypj5C0Yuobch8UhLmJUyOVkEfauuzr7WkEJstfsToNkU X-Received: by 2002:a05:6e02:1846:: with SMTP id b6mr16063550ilv.164.1636117523103; Fri, 05 Nov 2021 06:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636117523; cv=none; d=google.com; s=arc-20160816; b=pfnGra6L52vluaiJWCVrlOA8FndR9i1lM1jEJMfP2axEFs7haKIuDjCQ6HDfSsYjH9 Zjcl6JvvHKYBcqXGOpwYGf7Jw3CAl9YRNLAcRdPvU4AAkbqSKCQdpTibGA/Mgngz6FxY LM9c5FEWOu5Pt0rqNy+n+AvaTX1NnszW6vYJ1yeo9TiMWV1cPaBQhpn44ok5Xxg1qQcO bcPhLeCmbJsPEgiu3lBwz6HaeNg1pXbasfpm79GbDTWatCscKvoqHaZGC76LhWiJLJxm +OKs7rIapX3k1P4w2LHIeqhIOJYVD7WMW08mLkm0n0iTiJ8BVrHN/fsvivs2EKJ+o0B9 5kXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=x6d1+2xOuamzVUrfBvsA4oP2bv3Evl9f7XfAz35aLZA=; b=HqHIObcRu+7TfIMGCAiiJvi3XnczeUAZbJZO+ofRui6hR1YLPq9eIgcN60zBFgsV8q vmS7jKrbtYRvz3wjx3QufaLjo3+hV3nJEb8Y39YNqFUcIUV8vmNa5umt6RaaEOQ8nWUS TcbuMoCWQRKuq941CFeA7pC6sbDolCsFgp1Zm728gtfICYjSzWyuoOPqI8at3wkxPAHC BXkhfJiE10VT+2FtiLSw+ovV5re1aIP1JQV+lPow8VCcswCfQYFn7Dm2xz2Xedz3Yg72 NvKBkLCm4t2z6o5rB76HXuK6RAB4HWVHOIin89MeZ3ffZlGMNhjlkes9V7Vlsle+1Qvp AIdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m11si2214644ioj.90.2021.11.05.06.04.37; Fri, 05 Nov 2021 06:05:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231428AbhKENEJ (ORCPT + 99 others); Fri, 5 Nov 2021 09:04:09 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39048 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbhKENEI (ORCPT ); Fri, 5 Nov 2021 09:04:08 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: andrzej.p) with ESMTPSA id AB1B21F463C4 Subject: Re: [RFC] tty/sysrq: Add alternative SysRq key From: Andrzej Pietrasiewicz To: "Maciej W. Rozycki" Cc: Pavel Machek , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Greg Kroah-Hartman , Dmitry Torokhov , Jiri Slaby , kernel@collabora.com References: <20211103155438.11167-1-andrzej.p@collabora.com> <20211104120111.GB23122@duo.ucw.cz> <17ccc35d-441c-70c1-a80a-28a4ff824535@collabora.com> <9fbe062a-2992-0361-e72a-f2b1523143dd@collabora.com> Message-ID: Date: Fri, 5 Nov 2021 14:01:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <9fbe062a-2992-0361-e72a-f2b1523143dd@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, W dniu 04.11.2021 o 15:17, Andrzej Pietrasiewicz pisze: > Hi Maciej, > > W dniu 04.11.2021 o 14:13, Maciej W. Rozycki pisze: >> On Thu, 4 Nov 2021, Maciej W. Rozycki wrote: >> >>>   The reason for this is with their more recent laptops Lenovo in their >>> infinite wisdom have placed the key (which in a traditional >>> PS/2-keyboard manner produces when combined with ) in their >>> keyboards between the right and keys.  With thumbs not being >>> as accurate as other fingers (and the overall misdesign of the keyboard >>> and touchpad interface) you can imagine how often I have inadvertently hit >>> combined with a letter key, wreaking havoc to my system (and of >>> course I want to keep the key enabled for times when I do need it). >> >>   On second thoughts this can be disabled with `setkeycodes 54 0' once we >> do have an alternative combination available. >> > > Doesn't `setkeycodes` affect only one keyboard? What if there are more > keyboards connected to a machine? > > From drivers/tty/vt/keyboard.c: > > /* >  * Translation of scancodes to keycodes. We set them on only the first >  * keyboard in the list that accepts the scancode and keycode. >  * Explanation for not choosing the first attached keyboard anymore: >  *  USB keyboards for example have two event devices: one for all "normal" >  *  keys and one for extra function keys (like "volume up", "make coffee", >  *  etc.). So this means that scancodes for the extra function keys won't >  *  be valid for the first event device, but will be for the second. >  */ > My second thoughts: if we run `setkeycodes` to map, say, F10 as SysRq, don't we lose F10? Andrzej