mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
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:
1 parent
99fadbaafd
commit
409480b7a2
6 files changed
+3969
-3429
No files matched your search
+11
-10
@@ -49,6 +49,7 @@
|
||||
#include <grub/machine/console.h>
|
||||
#include <grub/cpu/linux.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
#include <grub/term.h>
|
||||
#include <multiboot.h>
|
||||
#include <multiboot2.h>
|
||||
|
||||
@@ -1179,16 +1180,16 @@ FUNCTION(grub_console_real_putchar)
|
||||
|
||||
/* this table is used in translate_keycode below */
|
||||
translation_table:
|
||||
.word GRUB_CONSOLE_KEY_LEFT, 2
|
||||
.word GRUB_CONSOLE_KEY_RIGHT, 6
|
||||
.word GRUB_CONSOLE_KEY_UP, 16
|
||||
.word GRUB_CONSOLE_KEY_DOWN, 14
|
||||
.word GRUB_CONSOLE_KEY_HOME, 1
|
||||
.word GRUB_CONSOLE_KEY_END, 5
|
||||
.word GRUB_CONSOLE_KEY_DC, 4
|
||||
.word GRUB_CONSOLE_KEY_BACKSPACE, 8
|
||||
.word GRUB_CONSOLE_KEY_PPAGE, 7
|
||||
.word GRUB_CONSOLE_KEY_NPAGE, 3
|
||||
.word GRUB_CONSOLE_KEY_LEFT, GRUB_TERM_LEFT
|
||||
.word GRUB_CONSOLE_KEY_RIGHT, GRUB_TERM_RIGHT
|
||||
.word GRUB_CONSOLE_KEY_UP, GRUB_TERM_UP
|
||||
.word GRUB_CONSOLE_KEY_DOWN, GRUB_TERM_DOWN
|
||||
.word GRUB_CONSOLE_KEY_HOME, GRUB_TERM_HOME
|
||||
.word GRUB_CONSOLE_KEY_END, GRUB_TERM_END
|
||||
.word GRUB_CONSOLE_KEY_DC, GRUB_TERM_DC
|
||||
.word GRUB_CONSOLE_KEY_BACKSPACE, GRUB_TERM_BACKSPACE
|
||||
.word GRUB_CONSOLE_KEY_PPAGE, GRUB_TERM_PPAGE
|
||||
.word GRUB_CONSOLE_KEY_NPAGE, GRUB_TERM_NPAGE
|
||||
.word 0
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user