From: Marco Gerards <mgerards@xs4all.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub2 accessibility: beeps
Date: Thu, 30 Nov 2006 20:50:47 +0100 [thread overview]
Message-ID: <87k61c3e94.fsf@xs4all.nl> (raw)
In-Reply-To: <1164913211.4067.46.camel@diesel> (Hollis Blanchard's message of "Thu, 30 Nov 2006 13:00:11 -0600")
Hollis Blanchard <hollis@penguinppc.org> writes:
> One topic that I've heard a lot about in the past few weeks is
> accessibility in grub2. Blind users, who otherwise have various devices
> like screen readers and brail TTYs, need to be able to interact with the
> bootloader.
Agreed.
> This can be as simple as using the PC speaker to beep when GRUB starts,
> and also to beep differently (e.g. different pitch, or different number
> of beeps) when highlighting different menu entries.
Right.
> Thanks to Vincent, we already have a PC speaker driver (cool!). However,
> we lack the ability to trigger it when switching menu entries (without
> selecting one). The problem boils down to this:
> menuentry "foo" {
> linux foo
> }
>
> The commands inside the menuentry block are only executed when the entry
> is selected, not highlighted. Perhaps the menuentry command could be
> extended to take an optional beep argument:
> menuentry "foo" <pitch> <duration> {
> linux foo
> }
I don't like this. One reason is that this is hard to implement. The
other is it is very specific and I am afraid "menuentry" becomes very
bloated.
> But wouldn't it be better to have something more general? Something like
> menuentry {
> title "foo"
> beep pitch duration
> }
> {
> linux foo
> }
Perhaps, I was thinking about something like:
menuentry "foo" --beep=pitch,duration
In that case it looks like a command.
Actually, what I would prefer is something hooks. It would be nice if
the C code in GRUB and perhaps also scripts can be hooked anywhere.
We have to be very careful about this, so perhaps limit the sets of
commands that can be used this way. But I think it will make GRUB
more flexible while it is not too much effort.
I am thinking of the following functions:
One to install a hook:
grub_err_t grub_hook_register (const char *name, (*hook) (...));
To trigger the hook (for example, when the user types something,
selects another menu entry, etc.
void grub_hook_call (const char *name, ...);
How to pass arguments to functions and to scripts is something that we
have to think about. For example, scripting functions have to get
strings, while in other cases we just want to deal with regular
function calls. Perhaps a printf-like mechanism can help us with
this.
In that case your problem can be solved by using:
function handlemenu {
beep depending on menuentry selected, the index is passed to this function
}
hook --install --hook=select-menu-entry --function=handlemenu
...
--
Marco
next prev parent reply other threads:[~2006-11-30 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-30 19:00 grub2 accessibility: beeps Hollis Blanchard
2006-11-30 19:50 ` Marco Gerards [this message]
2006-11-30 19:59 ` user-defined hooks Hollis Blanchard
2006-12-13 13:18 ` Thomas Schwinge
2006-12-02 17:15 ` grub2 accessibility: beeps Yoshinori K. Okuji
2006-12-04 20:40 ` Marco Gerards
2006-12-05 20:02 ` Yoshinori K. Okuji
2006-12-13 12:45 ` Marco Gerards
2006-12-13 21:38 ` Yoshinori K. Okuji
2006-12-01 15:05 ` tgingold
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=87k61c3e94.fsf@xs4all.nl \
--to=mgerards@xs4all.nl \
--cc=grub-devel@gnu.org \
/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.