From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZleOG-0007p2-2e for mharc-grub-devel@gnu.org; Mon, 12 Oct 2015 10:47:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZleO0-0007oD-46 for grub-devel@gnu.org; Mon, 12 Oct 2015 10:47:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZleNv-0002Y0-8J for grub-devel@gnu.org; Mon, 12 Oct 2015 10:47:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58410) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZleNv-0002Xr-3B for grub-devel@gnu.org; Mon, 12 Oct 2015 10:47:31 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 8A0B92FD9DE for ; Mon, 12 Oct 2015 14:47:30 +0000 (UTC) Received: from redhat.com (ovpn-113-49.phx2.redhat.com [10.3.113.49]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9CElS84018251 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 12 Oct 2015 10:47:30 -0400 Date: Mon, 12 Oct 2015 10:47:28 -0400 From: Peter Jones To: The development of GNU GRUB Subject: Re: [PATCH] Make CTRL and ALT keys work as expected on EFI systems (version 5). Message-ID: <20151012144727.GB19125@redhat.com> References: <1393366348-22020-1-git-send-email-pjones@redhat.com> <56195D9A.2010306@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56195D9A.2010306@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 14:47:40 -0000 On Sat, Oct 10, 2015 at 09:48:58PM +0300, Andrei Borzenkov wrote: Sorry - realized I should have addressed your question and said one more thing. > Are there open issues with this patch? Is it used by Fedora? The part about > SHIFT state bothers me, what happens for non-ASCII printable characters? > UEFI spec is extremely vague here. As for non-ASCII printables, I have no idea. I literally couldn't find a keyboard that generated any around my office. Even my European and Japanese coworkers don't seem to have them. That said, given the comment here: https://github.com/vathpela/edk2/blob/master/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c#L481 and the two tables here: https://github.com/vathpela/edk2/blob/master/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c#L36 https://github.com/vathpela/edk2/blob/master/MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c#L149 my guess is that on the vast majority of systems they just don't produce any keypress. We could do things like make right-alt act like AltGr and synthesize them ourselves, of course, if there's a significant need. (Awesomely, AltGr is defined by the EFI modifier list but not mapped from the USB bits. Which probably doesn't matter, since nobody uses keyboards with AltGr keys.) > As currently there is no way to actually input Ctrl-X or similar this is > needed. It may also allow us to actually implement keystatus on EFI. One issue related to implementing keystatus is the "Windows Fast Boot" feature, enabled by default in nearly all "client" machines now. (It's a Windows logo requirement.) This feature basically says not to probe USB and the like by default. So on any machines where your input device is USB, what winds up happening is that it probes for HII devices when you call ->read_key_stroke() or ->read_key_stroke_ex() the first time. Depending on the hardware configuration, how many devices are plugged in, how many hubs away the keyboard is, etc., this can take a surprisingly long period of time. (FWIW, I *think* register_key_notify() and set_key_state() will also trigger the driver loading and probing on most implementations.) For practical purposes right now, this is pretty much okay with how most people are using GRUB. But if somebody wanted to implement "don't show menus unless the user requested it before the reboot, or the last boot failed" in their grub config file, then the user gets a much quicker boot experience if we don't scan the keyboard. -- Peter