From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1S4ATu-0002lq-Hh for mharc-grub-devel@gnu.org; Sun, 04 Mar 2012 07:24:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ATs-0002lf-2g for grub-devel@gnu.org; Sun, 04 Mar 2012 07:24:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4ATq-0004d9-0o for grub-devel@gnu.org; Sun, 04 Mar 2012 07:24:03 -0500 Received: from wp191.webpack.hosteurope.de ([80.237.132.198]:35962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4ATp-0004ZY-On for grub-devel@gnu.org; Sun, 04 Mar 2012 07:24:01 -0500 Received: from p54ba7451.dip.t-dialin.net ([84.186.116.81] helo=neptun.omega.ssw.de); authenticated by wp191.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1S4ATn-0004Va-OR; Sun, 04 Mar 2012 13:23:59 +0100 Received: from localhost (localhost [127.0.0.1]) by neptun.omega.ssw.de (Postfix) with ESMTP id DC517E180A8; Sun, 4 Mar 2012 13:23:58 +0100 (CET) X-Virus-Scanned: amavisd-new at omega.ssw.de Received: from neptun.omega.ssw.de ([127.0.0.1]) by localhost (neptun.omega.ssw.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bColNy8CKdoi; Sun, 4 Mar 2012 13:23:47 +0100 (CET) Received: from [192.168.2.43] (p640.fritz.box [192.168.2.43]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by neptun.omega.ssw.de (Postfix) with ESMTP id 354CEE180A7; Sun, 4 Mar 2012 13:23:47 +0100 (CET) Message-ID: <4F535ECF.9010403@anvo-it.de> Date: Sun, 04 Mar 2012 13:23:43 +0100 From: Andreas Vogel User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Enhanced hotkey handling for menuentry References: <4F528288.7030200@anvo-it.de> <4F5286AD.1000506@gmail.com> <4F528D83.4020603@anvo-it.de> In-Reply-To: <4F528D83.4020603@anvo-it.de> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de; andreas.vogel@anvo-it.de; 1330863841; d54a8fcd; X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.237.132.198 Cc: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= 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: Sun, 04 Mar 2012 12:24:05 -0000 Am 03.03.2012 22:30, schrieb Andreas Vogel: >>> - new static function parse_key() >>> - hotkey aliases are now case insensitive >>> - additional hotkey aliases >> All added aliases conflict with normal function of these keys (arrows >> and pages) > Yes, I know. But it doesn't harm anyway and it might be useful to have > the code already in case the use of the keys change in the future. > Anyway, if you insist of leaving them out i'll obey. Thought about it again: when being now able to use modifiers ALT, CTRL and SHIFT, using the keys which have a already defined function (like arrows and pages) doesn't conflict. Even though e.g. KEY_UP is already used in menu I would like to be able to use SHIFT-UP as a hotkey. So in my opinion the hotkey parse function should handle all possible keys. >>> - handling now and modifiers for hotkeys >> Could you change to the emacs notation? > What is the emacs notation? I have no idea. I did a search and from what I've seen I assume you mean to use the following: - "C-" for CTRL - "A-" for ALT (even though emacs seems to use "M-" for ALT on most system) - "S-" for SHIFT (emacs doesn't seem to have any notion for SHIFT, but here we would need it) Using this notion valid hotkeys could be e.g. "C-F1", "C-S-F1" and "C-A-S-F1". The order of the modifiers are not significant so "C-A-S-F1" == "S-A-C-F1". Any comments? Please advise. >> Shift flag isn't valid with alphanumeric keys. > Ah, ok. Am I right that it's enough just not to set the SHIFT mask in > case isalnum() is true? Right now I don't fully understand the way GRUB key handling works in detail regarding modifiers. Form what I've learned until now it seems to be like this: - all alphanumeric keys never have the SHIFT modifier set - all keys having a #define GRUB_TERM_KEY_* all modifiers (CTRL, ALT, SHIFT) are possible - I'm not sure about GRUB_TER_BACKSPACE, GRUB_TERM_TAB and GRUB_TERM_ESC. What modifiers are allowed for them? BTW about using isalnum(): couldn't find any GRUB replacement. Is it save to include and use those functions?