From: Andreas Vogel <Andreas.Vogel@anvo-it.de>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Subject: Re: [PATCH] Enhanced hotkey handling for menuentry
Date: Sun, 04 Mar 2012 13:23:43 +0100 [thread overview]
Message-ID: <4F535ECF.9010403@anvo-it.de> (raw)
In-Reply-To: <4F528D83.4020603@anvo-it.de>
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<SHIFT> and<CTRL> 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 <ctype.h> and use those functions?
prev parent reply other threads:[~2012-03-04 12:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-03 20:43 [PATCH] Enhanced hotkey handling for menuentry Andreas Vogel
2012-03-03 21:01 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-03-03 21:30 ` Andreas Vogel
2012-03-04 12:23 ` Andreas Vogel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F535ECF.9010403@anvo-it.de \
--to=andreas.vogel@anvo-it.de \
--cc=grub-devel@gnu.org \
--cc=phcoder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.