Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp373729pxa; Wed, 12 Aug 2020 04:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwm8hAbBzDM92AdSO54JuoTSydS17El2mk6uIUU/hdvZeRqCOKBRj2mXjSBGrQ3RhNN8sI X-Received: by 2002:a17:906:af1a:: with SMTP id lx26mr32325492ejb.415.1597231769869; Wed, 12 Aug 2020 04:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597231769; cv=none; d=google.com; s=arc-20160816; b=DnwXjThnS6z805smZ3vfhdN/GN6KcNdIK5pDbGLENopzolsxyzAEGEd0eeIyudMBje 8VLT4yhAqdA4DCbnPpFcjoUdNVYz18TgzRgFzs1lxo5tTzfMuAU5Mc7lH5+fsSieL+q6 G3sC3J3JTwbtFnVxQqN+N7XinNRPla3q/6WkpxGwsB8QO7cU7KEQe10Zc3v9b1Fv/bOm w8gKIOOlYGyyGgZMaKJZSoU8c102xjxZA0WXmOFRjgWegq9Bk2Dl1rxFP4IPhS/xq16d IuuEUjYM58Ju+Par+kuiK4AHsicMYVMIe5gvSDxGQZBJTx2D5VmOU4u0HXZQzDOGq9yO b/xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=YOr17JzYt8Nyb+nUU7CG391osVxsn5HC6eTDQ8hBgFI=; b=iGqEJWwNAKqRyN1sFJCHcPTVMR6gMMnb+UGSxjJlYeUBfb3FelZPVqnyUGtQWpqM6L Go1nG8/CQCSKPHrkuZ9J86EyMx2afD6aE8TCGvPXsYRv7SbaukaxZNPjvAXP/xQCJ85H JJilpOLlN9tDmsax4fc0lx+o/1vFZ4yQhcW6HQd75cJomlk6/BZiuHoLojhWCl8WV5Mo pyOF+Z0ngo7XI0n2P+6bBwL32xjF4Aj1p/WN1iwo2lzVZcKP7vLo/pwtxgjvA6i58zxc 9C4J2kQtv8AnYgOoHOhrmHgGNsyLykMR2Ac97kpZv2fgbp4oBgRV19BkjFu/3znclNH4 hvqw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si961207ejk.175.2020.08.12.04.29.06; Wed, 12 Aug 2020 04:29:29 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbgHLL2b (ORCPT + 99 others); Wed, 12 Aug 2020 07:28:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:55712 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726453AbgHLL2a (ORCPT ); Wed, 12 Aug 2020 07:28:30 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 191A1B6D5; Wed, 12 Aug 2020 11:28:50 +0000 (UTC) Subject: Re: [PATCH 1/2] tty/sysrq: Extend the sysrq_key_table to cover capital letters To: Andrzej Pietrasiewicz , linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Dmitry Torokhov , linux-input@vger.kernel.org, kernel@collabora.com References: <20200804162402.2087-1-andrzej.p@collabora.com> <20200804162402.2087-2-andrzej.p@collabora.com> From: Jiri Slaby Autocrypt: addr=jslaby@suse.com; prefer-encrypt=mutual; keydata= mQINBE6S54YBEACzzjLwDUbU5elY4GT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wbTurR+nPZk+TYPndbDf1U0j8n0AEQEAAYkCHwQYAQIACQUCTpLnhgIb DAAKCRC9JbEEBrRwSTe1EACA74MWlvIhrhGWd+lxbXsB+elmL1VHn7Ovj3qfaMf/WV3BE79L 5A1IDyp0AGoxv1YjgE1qgA2ByDQBLjb0yrS1ppYqQCOSQYBPuYPVDk+IuvTpj/4rN2v3R5RW d6ozZNRBBsr4qHsnCYZWtEY2pCsOT6BE28qcbAU15ORMq0nQ/yNh3s/WBlv0XCP1gvGOGf+x UiE2YQEsGgjs8v719sguok8eADBbfmumerh/8RhPKRuTWxrXdNq/pu0n7hA6Btx7NYjBnnD8 lV8Qlb0lencEUBXNFDmdWussMAlnxjmKhZyb30m1IgjFfG30UloZzUGCyLkr/53JMovAswmC IHNtXHwb58Ikn1i2U049aFso+WtDz4BjnYBqCL1Y2F7pd8l2HmDqm2I4gubffSaRHiBbqcSB lXIjJOrd6Q66u5+1Yv32qk/nOL542syYtFDH2J5wM2AWvfjZH1tMOVvVMu5Fv7+0n3x/9shY ivRypCapDfcWBGGsbX5eaXpRfInaMTGaU7wmWO44Z5diHpmQgTLOrN9/MEtdkK6OVhAMVenI w1UnZnA+ZfaZYShi5oFTQk3vAz7/NaA5/bNHCES4PcDZw7Y/GiIh/JQR8H1JKZ99or9LjFeg HrC8YQ1nzkeDfsLtYM11oC3peHa5AiXLmCuSC9ammQ3LhkfET6N42xTu2A== Message-ID: Date: Wed, 12 Aug 2020 13:28:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200804162402.2087-2-andrzej.p@collabora.com> Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04. 08. 20, 18:24, Andrzej Pietrasiewicz wrote: > All slots in sysrq_key_table[] are either used, reserved or at least > commented with their intended use. This patch adds capital letter versions > available, which means adding 26 more entries. > > For already existing SysRq operations the user presses Alt-SysRq-, and > for the newly added ones Alt-Shift-SysRq-. And on some keyboards Alt-Fn-Shift-SysRq-. Ugh. ... > @@ -833,8 +873,13 @@ static bool sysrq_handle_keypress(struct sysrq_state *sysrq, > > default: > if (sysrq->active && value && value != 2) { > + unsigned char c = sysrq_xlate[code]; > + > sysrq->need_reinject = false; > - __handle_sysrq(sysrq_xlate[code], true); > + if (sysrq->shift_use != KEY_RESERVED) > + if (c >= 'a' && c <= 'z') > + c &= ~(1 << 5); /* to uppercase */ c = toupper(c); instead of the whole if. > + __handle_sysrq(c, true); > } > break; > } > thanks, -- js suse labs