Revert all parts done for BIOS keymap translation
This commit is contained in:
parent
eb628338db
commit
ed19677fe3
14 changed files with 166 additions and 347 deletions
|
@ -51,53 +51,4 @@
|
|||
#define OLPC_RIGHT '\0'
|
||||
#endif
|
||||
|
||||
#define GRUB_AT_KEY_KEYBOARD_MAP(name) \
|
||||
static const unsigned name[128] = \
|
||||
{ \
|
||||
/* 0x00 */ '\0', GRUB_TERM_ESC, '1', '2', '3', '4', '5', '6', \
|
||||
/* 0x08 */ '7', '8', '9', '0', \
|
||||
/* 0x0c */ '-', '=', GRUB_TERM_BACKSPACE, GRUB_TERM_TAB, \
|
||||
/* 0x10 */ 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', \
|
||||
/* 0x18 */ 'o', 'p', '[', ']', '\n', '\0', 'a', 's', \
|
||||
/* 0x20 */ 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', \
|
||||
/* 0x28 */ '\'', '`', '\0', '\\', 'z', 'x', 'c', 'v', \
|
||||
/* 0x30 */ 'b', 'n', 'm', ',', '.', '/', '\0', '*' | GRUB_TERM_KEYPAD, \
|
||||
/* 0x38 */ '\0', ' ', '\0', GRUB_TERM_KEY_F1, \
|
||||
/* 0x3c */ GRUB_TERM_KEY_F2, GRUB_TERM_KEY_F3, \
|
||||
/* 0x3e */ GRUB_TERM_KEY_F4, GRUB_TERM_KEY_F5, \
|
||||
/* 0x40 */ GRUB_TERM_KEY_F6, GRUB_TERM_KEY_F7, \
|
||||
/* 0x42 */ GRUB_TERM_KEY_F8, GRUB_TERM_KEY_F9, \
|
||||
/* 0x44 */ GRUB_TERM_KEY_F10, '\0', \
|
||||
/* 0x46 */ '\0', GRUB_TERM_KEY_HOME, \
|
||||
/* 0x48 */ GRUB_TERM_KEY_UP, \
|
||||
/* 0x49 */ GRUB_TERM_KEY_NPAGE, \
|
||||
/* 0x4a */ '-' | GRUB_TERM_KEYPAD, \
|
||||
/* 0x4b */ GRUB_TERM_KEY_LEFT, \
|
||||
/* 0x4c */ GRUB_TERM_KEY_CENTER | GRUB_TERM_KEYPAD, \
|
||||
/* 0x4d */ GRUB_TERM_KEY_RIGHT, \
|
||||
/* 0x4e */ '+' | GRUB_TERM_KEYPAD, \
|
||||
/* 0x4f */ GRUB_TERM_KEY_END, \
|
||||
/* 0x50 */ GRUB_TERM_KEY_DOWN, \
|
||||
/* 0x51 */ GRUB_TERM_KEY_PPAGE, \
|
||||
/* 0x52 */ GRUB_TERM_KEY_INSERT, \
|
||||
/* 0x53 */ GRUB_TERM_KEY_DC, \
|
||||
/* 0x54 */ '\0', '\0', GRUB_TERM_KEY_102, GRUB_TERM_KEY_F11, \
|
||||
/* 0x58 */ GRUB_TERM_KEY_F12, '\0', '\0', '\0', '\0', '\0', '\0', '\0', \
|
||||
/* 0x60 */ '\0', '\0', '\0', '\0', '\0', OLPC_UP, OLPC_DOWN, OLPC_LEFT, \
|
||||
/* 0x68 */ OLPC_RIGHT \
|
||||
}
|
||||
|
||||
#define GRUB_AT_KEY_KEYBOARD_MAP_SHIFT(name) \
|
||||
static unsigned name[128] = \
|
||||
{ \
|
||||
'\0', '\0', '!', '@', '#', '$', '%', '^', \
|
||||
'&', '*', '(', ')', '_', '+', '\0', '\0', \
|
||||
'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', \
|
||||
'O', 'P', '{', '}', '\n', '\0', 'A', 'S', \
|
||||
'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', \
|
||||
'\"', '~', '\0', '|', 'Z', 'X', 'C', 'V', \
|
||||
'B', 'N', 'M', '<', '>', '?', \
|
||||
[0x56] = GRUB_TERM_KEY_SHIFT_102 \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,19 +19,6 @@
|
|||
#ifndef GRUB_CONSOLE_MACHINE_HEADER
|
||||
#define GRUB_CONSOLE_MACHINE_HEADER 1
|
||||
|
||||
/* Define scan codes. */
|
||||
#define GRUB_CONSOLE_KEY_LEFT 0x4B00
|
||||
#define GRUB_CONSOLE_KEY_RIGHT 0x4D00
|
||||
#define GRUB_CONSOLE_KEY_UP 0x4800
|
||||
#define GRUB_CONSOLE_KEY_DOWN 0x5000
|
||||
#define GRUB_CONSOLE_KEY_IC 0x5200
|
||||
#define GRUB_CONSOLE_KEY_DC 0x5300
|
||||
#define GRUB_CONSOLE_KEY_BACKSPACE 0x0008
|
||||
#define GRUB_CONSOLE_KEY_HOME 0x4700
|
||||
#define GRUB_CONSOLE_KEY_END 0x4F00
|
||||
#define GRUB_CONSOLE_KEY_NPAGE 0x5100
|
||||
#define GRUB_CONSOLE_KEY_PPAGE 0x4900
|
||||
|
||||
#ifndef ASM_FILE
|
||||
|
||||
#include <grub/types.h>
|
||||
|
|
|
@ -21,8 +21,28 @@
|
|||
|
||||
#define GRUB_KEYBOARD_LAYOUTS_FILEMAGIC "GRUBLAYO"
|
||||
#define GRUB_KEYBOARD_LAYOUTS_FILEMAGIC_SIZE (sizeof(GRUB_KEYBOARD_LAYOUTS_FILEMAGIC) - 1)
|
||||
#define GRUB_KEYBOARD_LAYOUTS_VERSION 3
|
||||
#define GRUB_KEYBOARD_LAYOUTS_VERSION 4
|
||||
|
||||
#define GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE 256
|
||||
#define GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE 128
|
||||
|
||||
struct grub_keyboard_layout
|
||||
{
|
||||
struct
|
||||
{
|
||||
grub_uint32_t keyboard_map[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
grub_uint32_t keyboard_map_shift[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
grub_uint32_t keyboard_map_l3[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
grub_uint32_t keyboard_map_shift_l3[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
} at;
|
||||
struct
|
||||
{
|
||||
grub_uint32_t keyboard_map[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
grub_uint32_t keyboard_map_shift[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
grub_uint32_t keyboard_map_l3[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
grub_uint32_t keyboard_map_shift_l3[GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE];
|
||||
} usb;
|
||||
};
|
||||
|
||||
struct grub_keyboard_layout *EXPORT_VAR (grub_current_layout);
|
||||
|
||||
#endif /* GRUB_KEYBOARD_LAYOUTS */
|
||||
|
|
|
@ -24,41 +24,34 @@
|
|||
#define GRUB_TERM_SHIFT 0x01000000
|
||||
#define GRUB_TERM_CTRL 0x02000000
|
||||
#define GRUB_TERM_ALT 0x04000000
|
||||
/* Used by keylayouts code. Never returned in grub_getkey. */
|
||||
#define GRUB_TERM_ALT_GR 0x08000000
|
||||
#define GRUB_TERM_CAPS 0x10000000
|
||||
#define GRUB_TERM_KEYPAD 0x20000000
|
||||
|
||||
/* Keys without associated character. */
|
||||
#define GRUB_TERM_EXTENDED 0x00800000
|
||||
#define GRUB_TERM_KEY_MASK 0x00ffffff
|
||||
#define GRUB_TERM_KEY_LEFT (GRUB_TERM_EXTENDED | 1)
|
||||
#define GRUB_TERM_KEY_RIGHT (GRUB_TERM_EXTENDED | 2)
|
||||
#define GRUB_TERM_KEY_UP (GRUB_TERM_EXTENDED | 3)
|
||||
#define GRUB_TERM_KEY_DOWN (GRUB_TERM_EXTENDED | 4)
|
||||
#define GRUB_TERM_KEY_HOME (GRUB_TERM_EXTENDED | 5)
|
||||
#define GRUB_TERM_KEY_END (GRUB_TERM_EXTENDED | 6)
|
||||
#define GRUB_TERM_KEY_DC (GRUB_TERM_EXTENDED | 7)
|
||||
#define GRUB_TERM_KEY_PPAGE (GRUB_TERM_EXTENDED | 8)
|
||||
#define GRUB_TERM_KEY_NPAGE (GRUB_TERM_EXTENDED | 9)
|
||||
#define GRUB_TERM_KEY_F1 (GRUB_TERM_EXTENDED | 10)
|
||||
#define GRUB_TERM_KEY_F2 (GRUB_TERM_EXTENDED | 11)
|
||||
#define GRUB_TERM_KEY_F3 (GRUB_TERM_EXTENDED | 12)
|
||||
#define GRUB_TERM_KEY_F4 (GRUB_TERM_EXTENDED | 13)
|
||||
#define GRUB_TERM_KEY_F5 (GRUB_TERM_EXTENDED | 14)
|
||||
#define GRUB_TERM_KEY_F6 (GRUB_TERM_EXTENDED | 15)
|
||||
#define GRUB_TERM_KEY_F7 (GRUB_TERM_EXTENDED | 16)
|
||||
#define GRUB_TERM_KEY_F8 (GRUB_TERM_EXTENDED | 17)
|
||||
#define GRUB_TERM_KEY_F9 (GRUB_TERM_EXTENDED | 18)
|
||||
#define GRUB_TERM_KEY_F10 (GRUB_TERM_EXTENDED | 19)
|
||||
#define GRUB_TERM_KEY_F11 (GRUB_TERM_EXTENDED | 20)
|
||||
#define GRUB_TERM_KEY_F12 (GRUB_TERM_EXTENDED | 21)
|
||||
#define GRUB_TERM_KEY_INSERT (GRUB_TERM_EXTENDED | 22)
|
||||
#define GRUB_TERM_KEY_CENTER (GRUB_TERM_EXTENDED | 23)
|
||||
|
||||
/* Used by keylayouts code. Never returned in grub_getkey. */
|
||||
#define GRUB_TERM_KEY_102 0x80
|
||||
#define GRUB_TERM_KEY_SHIFT_102 0x81
|
||||
#define GRUB_TERM_KEY_LEFT (GRUB_TERM_EXTENDED | 0x4b)
|
||||
#define GRUB_TERM_KEY_RIGHT (GRUB_TERM_EXTENDED | 0x4d)
|
||||
#define GRUB_TERM_KEY_UP (GRUB_TERM_EXTENDED | 0x48)
|
||||
#define GRUB_TERM_KEY_DOWN (GRUB_TERM_EXTENDED | 0x50)
|
||||
#define GRUB_TERM_KEY_HOME (GRUB_TERM_EXTENDED | 0x47)
|
||||
#define GRUB_TERM_KEY_END (GRUB_TERM_EXTENDED | 0x4f)
|
||||
#define GRUB_TERM_KEY_DC (GRUB_TERM_EXTENDED | 0x53)
|
||||
#define GRUB_TERM_KEY_PPAGE (GRUB_TERM_EXTENDED | 0x49)
|
||||
#define GRUB_TERM_KEY_NPAGE (GRUB_TERM_EXTENDED | 0x51)
|
||||
#define GRUB_TERM_KEY_F1 (GRUB_TERM_EXTENDED | 0x3b)
|
||||
#define GRUB_TERM_KEY_F2 (GRUB_TERM_EXTENDED | 0x3c)
|
||||
#define GRUB_TERM_KEY_F3 (GRUB_TERM_EXTENDED | 0x3d)
|
||||
#define GRUB_TERM_KEY_F4 (GRUB_TERM_EXTENDED | 0x3e)
|
||||
#define GRUB_TERM_KEY_F5 (GRUB_TERM_EXTENDED | 0x3f)
|
||||
#define GRUB_TERM_KEY_F6 (GRUB_TERM_EXTENDED | 0x40)
|
||||
#define GRUB_TERM_KEY_F7 (GRUB_TERM_EXTENDED | 0x41)
|
||||
#define GRUB_TERM_KEY_F8 (GRUB_TERM_EXTENDED | 0x42)
|
||||
#define GRUB_TERM_KEY_F9 (GRUB_TERM_EXTENDED | 0x43)
|
||||
#define GRUB_TERM_KEY_F10 (GRUB_TERM_EXTENDED | 0x44)
|
||||
#define GRUB_TERM_KEY_F11 (GRUB_TERM_EXTENDED | 0x57)
|
||||
#define GRUB_TERM_KEY_F12 (GRUB_TERM_EXTENDED | 0x58)
|
||||
#define GRUB_TERM_KEY_INSERT (GRUB_TERM_EXTENDED | 0x52)
|
||||
#define GRUB_TERM_KEY_CENTER (GRUB_TERM_EXTENDED | 0x4c)
|
||||
|
||||
#define GRUB_TERM_ESC '\e'
|
||||
#define GRUB_TERM_TAB '\t'
|
||||
|
@ -168,16 +161,10 @@ struct grub_term_input
|
|||
/* Get keyboard modifier status. */
|
||||
int (*getkeystatus) (struct grub_term_input *term);
|
||||
|
||||
grub_uint32_t flags;
|
||||
|
||||
void *data;
|
||||
};
|
||||
typedef struct grub_term_input *grub_term_input_t;
|
||||
|
||||
#define GRUB_TERM_INPUT_FLAGS_TYPE_MASK 0xf
|
||||
#define GRUB_TERM_INPUT_FLAGS_TYPE_TERMCODES 0x0
|
||||
#define GRUB_TERM_INPUT_FLAGS_TYPE_BIOS 0x1
|
||||
|
||||
struct grub_term_output
|
||||
{
|
||||
/* The next terminal. */
|
||||
|
@ -314,8 +301,8 @@ grub_term_unregister_output (grub_term_output_t term)
|
|||
#define FOR_DISABLED_TERM_OUTPUTS(var) FOR_LIST_ELEMENTS((var), (grub_term_outputs_disabled))
|
||||
|
||||
void grub_putcode (grub_uint32_t code, struct grub_term_output *term);
|
||||
extern int (*EXPORT_VAR(grub_getkey)) (void);
|
||||
int grub_checkkey (void);
|
||||
int EXPORT_FUNC(grub_getkey) (void);
|
||||
int EXPORT_FUNC(grub_checkkey) (void);
|
||||
void grub_cls (void);
|
||||
void EXPORT_FUNC(grub_refresh) (void);
|
||||
void grub_puts_terminal (const char *str, struct grub_term_output *term);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue