Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MfVaC-0005dX-Cz for mharc-grub-devel@gnu.org; Mon, 24 Aug 2009 05:11:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfVaA-0005cT-OA for grub-devel@gnu.org; Mon, 24 Aug 2009 05:11:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfVa5-0005bc-Bg for grub-devel@gnu.org; Mon, 24 Aug 2009 05:11:17 -0400 Received: from [199.232.76.173] (port=42925 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfVa5-0005bZ-2c for grub-devel@gnu.org; Mon, 24 Aug 2009 05:11:13 -0400 Received: from smarthost01.mail.zen.net.uk ([212.23.3.140]:60614) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfVa4-00052e-P3 for grub-devel@gnu.org; Mon, 24 Aug 2009 05:11:12 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost01.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1MfVa3-00076S-Sy for grub-devel@gnu.org; Mon, 24 Aug 2009 09:11:12 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) for grub-devel@gnu.org id 1MfVa2-0004Hb-00; Mon, 24 Aug 2009 10:11:10 +0100 Date: Mon, 24 Aug 2009 10:11:10 +0100 From: Colin Watson To: The development of GRUB 2 Message-ID: <20090824091109.GC11691@riva.ucam.org> Mail-Followup-To: The development of GRUB 2 References: <20090812153520.GA11691@riva.ucam.org> <20090823222745.GA25665@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090823222745.GA25665@thorin> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost01-IP: [82.69.40.219] X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] Detect key modifier status in 'sleep --interruptible' X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2009 09:11:18 -0000 On Mon, Aug 24, 2009 at 12:27:45AM +0200, Robert Millan wrote: > On Wed, Aug 12, 2009 at 04:35:21PM +0100, Colin Watson wrote: > > +static int > > +grub_at_keyboard_keystatus (void) > > +{ > > + /* FIXME: I don't know if getting key modifier status is possible without > > + * BIOS help. */ > > + return 0; > > +} > > + > > What we do in these cases is leave the function pointer undefined, which > means NULL value (and check this in the caller of course). OK. > But in at_keyboard it's definitely possible (check how we handle e.g. CTRL > or SHIFT keys). No, that code only spots make scan codes arriving after GRUB's terminal starts up. AFAICS it has no way to tell whether e.g. Shift was held down already when GRUB started (except through the vagaries of key repeat), which is important here. -- Colin Watson [cjwatson@ubuntu.com]