/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2003,2005,2007,2008,2009 Free Software Foundation, Inc.
*
* 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/>.
*/
#include <grub/keyboard_layouts.h>
GRUB_MOD_LICENSE ("GPLv3+");
.keyboard_map = {
/* Keyboard errors. Handled by driver. */
/* 0x00 */ 0, 0, 0, 0,
/* 0x04 */ 'a', 'b', 'c', 'd',
/* 0x08 */ 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
/* 0x10 */ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
/* 0x18 */ 'u', 'v', 'w', 'x', 'y', 'z', '1', '2',
/* 0x20 */ '3', '4', '5', '6', '7', '8', '9', '0',
/* 0x28 */ '\n', '\e', '\b', '\t', ' ', '-', '=', '[',
/* According to usage table 0x31 should be mapped to '/'
but testing with real keyboard shows that 0x32 is remapped to '/'.
Map 0x31 to 0.
*/
/* 0x30 */ ']', 0, '\\', ';', '\'', '`', ',', '.',
/* 0x39 is CapsLock. Handled by driver. */
/* PrtScr and ScrollLock. Not handled yet. */
/* 0x46 */ 0, 0,
/* 0x48 is Pause. Not handled yet. */
/* 0x48 */ 0, GRUB_TERM_KEY_INSERT,
/* 0x53 is NumLock. Handled by driver. */
/* 0x52 */ GRUB_TERM_KEY_UP, 0,
/* 0x54 */ '/', '*',
/* 0x56 */ '-', '+',
/* 0x64 */ '\\'
},
.keyboard_map_shift = {
/* Keyboard errors. Handled by driver. */
/* 0x00 */ 0, 0, 0, 0,
/* 0x04 */ 'A', 'B', 'C', 'D',
/* 0x08 */ 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
/* 0x10 */ 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
/* 0x18 */ 'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@',
/* 0x20 */ '#', '$', '%', '^', '&', '*', '(', ')',
/* According to usage table 0x31 should be mapped to '/'
but testing with real keyboard shows that 0x32 is remapped to '/'.
Map 0x31 to 0.
*/
/* 0x30 */ '}', 0, '|', ':', '"', '~', '<', '>',
/* 0x39 is CapsLock. Handled by driver. */
/* 0x38 */ '?', 0,
/* PrtScr and ScrollLock. Not handled yet. */
/* 0x46 */ 0, 0,
/* 0x48 is Pause. Not handled yet. */
/* 0x53 is NumLock. Handled by driver. */
/* 0x54 */ '/', '*',
/* 0x56 */ '-', '+',
/* 0x60 */ '8', '9', '0', '.', '|'
}
};
static int
{
*alt_gr_consumed = 0;
if (status & GRUB_TERM_STATUS_RALT)
{
{
{
*alt_gr_consumed = 1;
}
}
{
*alt_gr_consumed = 1;
}
}
else
}
unsigned
{
int alt_gr_consumed = 0;
int key;
{
else
}
if (status & GRUB_TERM_STATUS_CAPS)
{
}
if ((status & GRUB_TERM_STATUS_LALT) ||
key |= GRUB_TERM_ALT;
key |= GRUB_TERM_CTRL;
return key;
}
static grub_err_t
{
char *filename;
unsigned i;
if (argc < 1)
{
if (!prefix)
if (!filename)
return grub_errno;
}
else
if (! file)
goto fail;
{
if (!grub_errno)
goto fail;
}
{
goto fail;
}
{
if (!grub_errno)
goto fail;
}
{
goto fail;
}
if (!newmap)
goto fail;
{
if (!grub_errno)
goto fail;
}
return GRUB_ERR_NONE;
fail:
if (file)
return grub_errno;
}
{
0, N_("Load a keyboard layout."));
}
{
}