vaseboot/include/VasEBoot/keyboard_layouts.h

151 lines
5.7 KiB
C

/*
* VAS_EBOOT -- GRand Unified Bootloader
* Copyright (C) 2010 Free Software Foundation, Inc.
*
* VAS_EBOOT 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.
*
* VAS_EBOOT 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 VAS_EBOOT. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VAS_EBOOT_KEYBOARD_LAYOUTS_H
#define VAS_EBOOT_KEYBOARD_LAYOUTS_H 1
#define VAS_EBOOT_KEYBOARD_LAYOUTS_FILEMAGIC "VAS_EBOOTLAYO"
#define VAS_EBOOT_KEYBOARD_LAYOUTS_FILEMAGIC_SIZE (sizeof(VAS_EBOOT_KEYBOARD_LAYOUTS_FILEMAGIC) - 1)
#define VAS_EBOOT_KEYBOARD_LAYOUTS_VERSION 10
#define VAS_EBOOT_KEYBOARD_LAYOUTS_ARRAY_SIZE 160
struct VasEBoot_keyboard_layout
{
VasEBoot_uint32_t keyboard_map[VAS_EBOOT_KEYBOARD_LAYOUTS_ARRAY_SIZE];
VasEBoot_uint32_t keyboard_map_shift[VAS_EBOOT_KEYBOARD_LAYOUTS_ARRAY_SIZE];
VasEBoot_uint32_t keyboard_map_l3[VAS_EBOOT_KEYBOARD_LAYOUTS_ARRAY_SIZE];
VasEBoot_uint32_t keyboard_map_shift_l3[VAS_EBOOT_KEYBOARD_LAYOUTS_ARRAY_SIZE];
};
typedef enum VasEBoot_keyboard_key
{
VAS_EBOOT_KEYBOARD_KEY_A = 0x04,
VAS_EBOOT_KEYBOARD_KEY_B = 0x05,
VAS_EBOOT_KEYBOARD_KEY_C = 0x06,
VAS_EBOOT_KEYBOARD_KEY_D = 0x07,
VA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BOOT_KEYBOARD_KEY_LEFT_CTRL = 0xe0,
VAS_EBOOT_KEYBOARD_KEY_LEFT_SHIFT = 0xe1,
VAS_EBOOT_KEYBOARD_KEY_LEFT_ALT = 0xe2,
VAS_EBOOT_KEYBOARD_KEY_RIGHT_CTRL = 0xe4,
VAS_EBOOT_KEYBOARD_KEY_RIGHT_SHIFT = 0xe5,
VAS_EBOOT_KEYBOARD_KEY_RIGHT_ALT = 0xe6,
} VasEBoot_keyboard_key_t;
unsigned EXPORT_FUNC(VasEBoot_term_map_key) (VasEBoot_keyboard_key_t code, int status);
#ifndef VAS_EBOOT_MACHINE_EMU
extern void VasEBoot_keylayouts_init (void);
extern void VasEBoot_keylayouts_fini (void);
#endif
#endif /* VAS_EBOOT_KEYBOARD_LAYOUTS */