[console] Allow for named keyboard mappings
Separate the concept of a keyboard mapping from a list of remapped keys, to allow for the possibility of supporting multiple keyboard mappings at runtime. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -10,10 +10,17 @@ FILE_LICENCE ( PUBLIC_DOMAIN );
|
||||
|
||||
#include <ipxe/keymap.h>
|
||||
|
||||
/** "uk" keyboard mapping */
|
||||
struct key_mapping uk_mapping[] __keymap = {
|
||||
/** "uk" basic remapping */
|
||||
static struct keymap_key uk_basic[] = {
|
||||
{ 0x22, 0x40 }, /* '"' => '@' */
|
||||
{ 0x40, 0x22 }, /* '@' => '"' */
|
||||
{ 0x5c, 0x23 }, /* '\\' => '#' */
|
||||
{ 0x7c, 0x7e }, /* '|' => '~' */
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
/** "uk" keyboard map */
|
||||
struct keymap uk_keymap __keymap = {
|
||||
.name = "uk",
|
||||
.basic = uk_basic,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user