Reimported heavily modified version of cpina's grub-mklayout

This commit is contained in:
Carles Pina i Estany 2010-08-19 02:15:29 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 7a6459e12d
commit b6f7b4ba03
7 changed files with 335 additions and 15 deletions

View file

@ -52,7 +52,7 @@
#endif
#define GRUB_AT_KEY_KEYBOARD_MAP(name) \
static const int name[128] = \
static const unsigned name[128] = \
{ \
'\0', GRUB_TERM_ESC, '1', '2', '3', '4', '5', '6', \
'7', '8', '9', '0', '-', '=', GRUB_TERM_BACKSPACE, GRUB_TERM_TAB, \
@ -75,4 +75,17 @@ static const int name[128] = \
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

View file

@ -0,0 +1,28 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2010 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
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GRUB_KEYBOARD_LAYOUTS_H
#define GRUB_KEYBOARD_LAYOUTS_H 1
#define GRUB_KEYBOARD_LAYOUTS_FILEMAGIC "GRUBLAYO"
#define GRUB_KEYBOARD_LAYOUTS_FILEMAGIC_SIZE (sizeof(GRUB_KEYBOARD_LAYOUTS_FILEMAGIC) - 1)
#define GRUB_KEYBOARD_LAYOUTS_VERSION 2
#define GRUB_KEYBOARD_LAYOUTS_ARRAY_SIZE 256
#endif /* GRUB_KEYBOARD_LAYOUTS */

View file

@ -53,8 +53,8 @@
#define GRUB_TERM_KEY_INSERT (GRUB_TERM_EXTENDED | 22)
/* Used by keylayouts code. Never returned in grub_getkey. */
#define GRUB_TERM_KEY_102 (GRUB_TERM_EXTENDED | 23)
#define GRUB_TERM_KEY_SHIFT_102 (GRUB_TERM_EXTENDED | 24)
#define GRUB_TERM_KEY_102 0x80
#define GRUB_TERM_KEY_SHIFT_102 0x81
#define GRUB_TERM_ESC '\e'
#define GRUB_TERM_TAB '\t'