From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1V6kBd-0007kh-31 for mharc-grub-devel@gnu.org; Tue, 06 Aug 2013 12:32:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45752) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6kBX-0007jT-3R for grub-devel@gnu.org; Tue, 06 Aug 2013 12:32:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6kBS-0004bv-Nf for grub-devel@gnu.org; Tue, 06 Aug 2013 12:32:35 -0400 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:65001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6kBS-0004bj-GE for grub-devel@gnu.org; Tue, 06 Aug 2013 12:32:30 -0400 Received: by mail-lb0-f176.google.com with SMTP id w10so647859lbi.7 for ; Tue, 06 Aug 2013 09:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=JKncSlbjlX7q08lGDAoGD46bg6dDhZVqLp0xotA3HHM=; b=G0G7CKK2hVKHqTb67sCJwtnxzR/hLwTlwaraXOlwLgT33Udn3orvZguoi1bap967ez bmQ/RaO77UrA48e+d6vOWIR39Hwh9m9fu7uHVofjFysnf7Ef4D/Vf3AgeuA/BiT/rFh8 9L5dRJ5ORvR5JcNibjDxVL8T4jNj4wlcjBrB22t0iDwENswdLCv10raIB016Mkm2QiOI g8P4jnUTpTj4NGMod6PVbex451nJDzwBmR7JG8nWBYuLiwSpufdsddbw03BzTvdq2LTh 43JUmesJAI9eyupDQevx2wyFZsgyLEpHrFjMXg8jID1O76Y+oujM4q0MhUP/OFEhkUCj N/yQ== X-Received: by 10.152.29.134 with SMTP id k6mr995035lah.88.1375806749105; Tue, 06 Aug 2013 09:32:29 -0700 (PDT) Received: from opensuse.site (ppp79-139-160-84.pppoe.spdop.ru. [79.139.160.84]) by mx.google.com with ESMTPSA id js17sm1083350lab.5.2013.08.06.09.32.28 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 06 Aug 2013 09:32:28 -0700 (PDT) Date: Tue, 6 Aug 2013 20:32:26 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: ctrl-x / ctrl-c may not work under GRUB2 with EFI Message-ID: <20130806203226.4105e402@opensuse.site> In-Reply-To: <5200B552.4020705@wp.pl> References: <5200B552.4020705@wp.pl> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::230 Cc: eyak@wp.pl 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: Tue, 06 Aug 2013 16:32:39 -0000 В Tue, 06 Aug 2013 10:35:30 +0200 Pawel Wojtalczyk пишет: > Hello, > > I run GRUB2 as 64-bit EFI application and I use gfxterm and serial as > output. > > I would like to edit commands before boot by type 'e' command. Then I > would like to boot by press ctrl-x, but unfortunately the boot does not > appears. > Does F10 work? > The reason is that in AMI and Phoenix BIOSes when ctrl key is pressed > then EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol returns VT100 style > encoding of pressed unicode character ( > http://www.vt100.net/docs/vt100-ug/table3-5.html). > > I tried to use EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL to get the pressed key > modifier (ctrl, alt, etc), but in case when serial console redirection > enabled in Phoenix BIOS, none characters are received via serial with > EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL(with AMI BIOS characters are received > in VT100 encoding style). > > So maybe we can do another way. Maybe we can explicitly set key modifier > (as in grub_terminfo_getkey() with > http://wiki.phoenix.com/wiki/index.php/Unicode_Control_Characters > restrictions) as following: > > --- grub.orig/grub-core/term/efi/console.c 2013-07-31 > 07:50:52.000000000 +0200 > +++ grub/grub-core/term/efi/console.c 2013-08-06 10:28:26.117499386 +0200 > @@ -125,7 +125,12 @@ > return GRUB_TERM_NO_KEY; > > if (key.scan_code == 0) > - return key.unicode_char; > +#if defined (__i386__) || defined (__x86_64__) > + if (key.unicode_char < 0x20 && key.unicode_char != 0 && > key.unicode_char != '\t' && key.unicode_char != '\b' && key.unicode_char > != '\n' && key.unicode_char != '\r') > + return GRUB_TERM_CTRL | (key.unicode_char - 1 + 'a'); > + else > +#endif /* defined (__i386__) || defined (__x86_64__) */ > + return key.unicode_char; > else if (key.scan_code < ARRAY_SIZE (efi_codes)) > return efi_codes[key.scan_code]; > > In some remote systems EFI serial redirection must be enabled and thus > we cannot use serial (as termianl_input) module in GRUB2 and in such > case it would be good to allow add support for ctrl-x/ctrl-c under GRUB2 > via serial console redirection enabled in EFI and attached USB keyboard. > > Regrads > Pawel Wojtalczyk