Skeleton for keyboard layouts

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-10 14:54:51 +02:00
parent c6e5caab1d
commit 87fae34a1f
21 changed files with 337 additions and 168 deletions

View file

@ -75,8 +75,8 @@ grub_putchar (int c)
}
}
int
grub_getkey (void)
static int
grub_getkey_dumb (void)
{
grub_term_input_t term;
@ -88,42 +88,14 @@ grub_getkey (void)
{
int key = term->checkkey ();
if (key != -1)
return term->getkey ();
return term->getkey () & 0xff;
}
grub_cpu_idle ();
}
}
int
grub_checkkey (void)
{
grub_term_input_t term;
FOR_ACTIVE_TERM_INPUTS(term)
{
int key = term->checkkey ();
if (key != -1)
return key;
}
return -1;
}
int
grub_getkeystatus (void)
{
int status = 0;
grub_term_input_t term;
FOR_ACTIVE_TERM_INPUTS(term)
{
if (term->getkeystatus)
status |= term->getkeystatus ();
}
return status;
}
int (*grub_getkey) (void) = grub_getkey_dumb;
void
grub_cls (void)