Esempio n. 1
0
static void
set_scancodes (void)
{
  /* You must have visited computer museum. Keyboard without scancode set
     knowledge. Assume XT. */
  if (!grub_keyboard_orig_set)
    {
      grub_dprintf ("atkeyb", "No sets support assumed\n");
      current_set = 1;
      return;
    }

  grub_keyboard_controller_write (grub_keyboard_controller_orig
				  & ~KEYBOARD_AT_TRANSLATE);

  write_mode (2);
  current_set = query_mode ();
  grub_dprintf ("atkeyb", "returned set %d\n", current_set);
  if (current_set == 2)
    return;

  write_mode (1);
  current_set = query_mode ();
  grub_dprintf ("atkeyb", "returned set %d\n", current_set);
  if (current_set == 1)
    return;
  grub_printf ("No supported scancode set found\n");
}
Esempio n. 2
0
static grub_err_t
grub_keyboard_controller_init (void)
{
  pending_key = -1;
  at_keyboard_status = 0;
  grub_keyboard_controller_orig = grub_keyboard_controller_read ();
  grub_keyboard_controller_write (grub_keyboard_controller_orig | KEYBOARD_SCANCODE_SET1);
  return GRUB_ERR_NONE;
}
Esempio n. 3
0
static grub_err_t
grub_keyboard_controller_fini (void)
{
  grub_keyboard_controller_write (grub_keyboard_controller_orig);
  return GRUB_ERR_NONE;
}