2008-02-05 Robert Millan <rmh@aybabtu.com>
* include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT) (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END) (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC) (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros. * kern/i386/pc/startup.S: Include `<grub/term.h>'. (translation_table): Replace hardcoded values with macros provided by `<grub/term.h>'. * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'. (keyboard_map): Correct/add a few values, with macros provided by `<grub/term.h>'. (keyboard_map_shift): Zero values that don't differ from their `keyboard_map' equivalents. (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling. Discard the second scan code that is always sent by Caps lock. Only use `keyboard_map_shift' when it provides a non-zero value, otherwise fallback to `keyboard_map'.
This commit is contained in:
parent
99fadbaafd
commit
409480b7a2
6 changed files with 3969 additions and 3429 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2002,2003,2005,2007 Free Software Foundation, Inc.
|
||||
* Copyright (C) 2002,2003,2005,2007,2008 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -19,6 +19,22 @@
|
|||
#ifndef GRUB_TERM_HEADER
|
||||
#define GRUB_TERM_HEADER 1
|
||||
|
||||
/* Internal codes used by GRUB to represent terminal input. */
|
||||
#define GRUB_TERM_LEFT 2
|
||||
#define GRUB_TERM_RIGHT 6
|
||||
#define GRUB_TERM_UP 16
|
||||
#define GRUB_TERM_DOWN 14
|
||||
#define GRUB_TERM_HOME 1
|
||||
#define GRUB_TERM_END 5
|
||||
#define GRUB_TERM_DC 4
|
||||
#define GRUB_TERM_PPAGE 7
|
||||
#define GRUB_TERM_NPAGE 3
|
||||
#define GRUB_TERM_ESC '\e'
|
||||
#define GRUB_TERM_TAB '\t'
|
||||
#define GRUB_TERM_BACKSPACE '\b'
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
#include <grub/err.h>
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
|
@ -211,4 +227,6 @@ void EXPORT_FUNC(grub_set_more) (int onoff);
|
|||
/* For convenience. */
|
||||
#define GRUB_TERM_ASCII_CHAR(c) ((c) & 0xff)
|
||||
|
||||
#endif /* ! ASM_FILE */
|
||||
|
||||
#endif /* ! GRUB_TERM_HEADER */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue