Bladeren bron

[console] Add keymap generator

Inspired by LILO's keytab-lilo.pl, genkeymap.pl uses "loadkeys -b" to
obtain a Linux keyboard map, and generates a file keymap_xx.c in
hci/keymap.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 jaren geleden
bovenliggende
commit
1febd879e3

+ 2
- 0
src/Makefile Bestand weergeven

@@ -45,6 +45,7 @@ ELF2EFI64	:= ./util/elf2efi64
45 45
 EFIROM		:= ./util/efirom
46 46
 ICCFIX		:= ./util/iccfix
47 47
 EINFO		:= ./util/einfo
48
+GENKEYMAP	:= ./util/genkeymap.pl
48 49
 DOXYGEN		:= doxygen
49 50
 BINUTILS_DIR	:= /usr
50 51
 BFD_DIR		:= $(BINUTILS_DIR)
@@ -80,6 +81,7 @@ SRCDIRS		+= tests
80 81
 SRCDIRS		+= crypto crypto/axtls crypto/matrixssl
81 82
 SRCDIRS		+= hci hci/commands hci/tui
82 83
 SRCDIRS		+= hci/mucurses hci/mucurses/widgets
84
+SRCDIRS		+= hci/keymap
83 85
 SRCDIRS		+= usr
84 86
 SRCDIRS		+= config
85 87
 

+ 8
- 0
src/Makefile.housekeeping Bestand weergeven

@@ -1085,6 +1085,14 @@ docview :
1085 1085
 
1086 1086
 endif # defined(BIN)
1087 1087
 
1088
+###############################################################################
1089
+#
1090
+# Keyboard maps
1091
+#
1092
+
1093
+hci/keymap/keymap_%.c : $(GENKEYMAP)
1094
+	$(Q)$(PERL) $(GENKEYMAP) $* > $@
1095
+
1088 1096
 ###############################################################################
1089 1097
 #
1090 1098
 # Clean-up

+ 31
- 0
src/hci/keymap/keymap_al.c Bestand weergeven

@@ -0,0 +1,31 @@
1
+/** @file
2
+ *
3
+ * "al" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "al" keyboard mapping */
14
+struct key_mapping al_mapping[] __keymap = {
15
+	{ 0x19, 0x1a },	/* Ctrl-Y => Ctrl-Z */
16
+	{ 0x1a, 0x19 },	/* Ctrl-Z => Ctrl-Y */
17
+	{ 0x22, 0x7b },	/* '"' => '{' */
18
+	{ 0x27, 0x5b },	/* '\'' => '[' */
19
+	{ 0x3e, 0x3a },	/* '>' => ':' */
20
+	{ 0x40, 0x22 },	/* '@' => '"' */
21
+	{ 0x59, 0x5a },	/* 'Y' => 'Z' */
22
+	{ 0x5a, 0x59 },	/* 'Z' => 'Y' */
23
+	{ 0x5c, 0x5d },	/* '\\' => ']' */
24
+	{ 0x5d, 0x40 },	/* ']' => '@' */
25
+	{ 0x60, 0x5c },	/* '`' => '\\' */
26
+	{ 0x79, 0x7a },	/* 'y' => 'z' */
27
+	{ 0x7a, 0x79 },	/* 'z' => 'y' */
28
+	{ 0x7c, 0x7d },	/* '|' => '}' */
29
+	{ 0x7d, 0x27 },	/* '}' => '\'' */
30
+	{ 0x7e, 0x7c },	/* '~' => '|' */
31
+};

+ 24
- 0
src/hci/keymap/keymap_az.c Bestand weergeven

@@ -0,0 +1,24 @@
1
+/** @file
2
+ *
3
+ * "az" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "az" keyboard mapping */
14
+struct key_mapping az_mapping[] __keymap = {
15
+	{ 0x23, 0x27 },	/* '#' => '\'' */
16
+	{ 0x24, 0x3b },	/* '$' => ';' */
17
+	{ 0x26, 0x3f },	/* '&' => '?' */
18
+	{ 0x2f, 0x2e },	/* '/' => '.' */
19
+	{ 0x3a, 0x49 },	/* ':' => 'I' */
20
+	{ 0x3f, 0x2c },	/* '?' => ',' */
21
+	{ 0x40, 0x22 },	/* '@' => '"' */
22
+	{ 0x5e, 0x3a },	/* '^' => ':' */
23
+	{ 0x7c, 0x2f },	/* '|' => '/' */
24
+};

+ 15
- 0
src/hci/keymap/keymap_bg.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "bg" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "bg" keyboard mapping */
14
+struct key_mapping bg_mapping[] __keymap = {
15
+};

+ 15
- 0
src/hci/keymap/keymap_by.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "by" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "by" keyboard mapping */
14
+struct key_mapping by_mapping[] __keymap = {
15
+};

+ 24
- 0
src/hci/keymap/keymap_cf.c Bestand weergeven

@@ -0,0 +1,24 @@
1
+/** @file
2
+ *
3
+ * "cf" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "cf" keyboard mapping */
14
+struct key_mapping cf_mapping[] __keymap = {
15
+	{ 0x23, 0x2f },	/* '#' => '/' */
16
+	{ 0x3c, 0x27 },	/* '<' => '\'' */
17
+	{ 0x3e, 0x2e },	/* '>' => '.' */
18
+	{ 0x40, 0x22 },	/* '@' => '"' */
19
+	{ 0x5c, 0x3c },	/* '\\' => '<' */
20
+	{ 0x5e, 0x3f },	/* '^' => '?' */
21
+	{ 0x60, 0x23 },	/* '`' => '#' */
22
+	{ 0x7c, 0x3e },	/* '|' => '>' */
23
+	{ 0x7e, 0x7c },	/* '~' => '|' */
24
+};

+ 27
- 0
src/hci/keymap/keymap_cz.c Bestand weergeven

@@ -0,0 +1,27 @@
1
+/** @file
2
+ *
3
+ * "cz" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "cz" keyboard mapping */
14
+struct key_mapping cz_mapping[] __keymap = {
15
+	{ 0x21, 0x2b },	/* '!' => '+' */
16
+	{ 0x2d, 0x3d },	/* '-' => '=' */
17
+	{ 0x2f, 0x2d },	/* '/' => '-' */
18
+	{ 0x31, 0x2b },	/* '1' => '+' */
19
+	{ 0x3c, 0x5c },	/* '<' => '\\' */
20
+	{ 0x3e, 0x2e },	/* '>' => '.' */
21
+	{ 0x3f, 0x2d },	/* '?' => '-' */
22
+	{ 0x5d, 0x29 },	/* ']' => ')' */
23
+	{ 0x5f, 0x3d },	/* '_' => '=' */
24
+	{ 0x60, 0x3b },	/* '`' => ';' */
25
+	{ 0x7d, 0x29 },	/* '}' => ')' */
26
+	{ 0x7e, 0x3b },	/* '~' => ';' */
27
+};

+ 45
- 0
src/hci/keymap/keymap_de.c Bestand weergeven

@@ -0,0 +1,45 @@
1
+/** @file
2
+ *
3
+ * "de" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "de" keyboard mapping */
14
+struct key_mapping de_mapping[] __keymap = {
15
+	{ 0x19, 0x1a },	/* Ctrl-Y => Ctrl-Z */
16
+	{ 0x1a, 0x19 },	/* Ctrl-Z => Ctrl-Y */
17
+	{ 0x22, 0x7d },	/* '"' => '}' */
18
+	{ 0x26, 0x2f },	/* '&' => '/' */
19
+	{ 0x27, 0x5d },	/* '\'' => ']' */
20
+	{ 0x28, 0x29 },	/* '(' => ')' */
21
+	{ 0x29, 0x3d },	/* ')' => '=' */
22
+	{ 0x2a, 0x28 },	/* '*' => '(' */
23
+	{ 0x2b, 0x60 },	/* '+' => '`' */
24
+	{ 0x2d, 0x5c },	/* '-' => '\\' */
25
+	{ 0x2f, 0x2d },	/* '/' => '-' */
26
+	{ 0x3a, 0x7b },	/* ':' => '{' */
27
+	{ 0x3b, 0x5b },	/* ';' => '[' */
28
+	{ 0x3d, 0x27 },	/* '=' => '\'' */
29
+	{ 0x3e, 0x3a },	/* '>' => ':' */
30
+	{ 0x3f, 0x5f },	/* '?' => '_' */
31
+	{ 0x40, 0x22 },	/* '@' => '"' */
32
+	{ 0x59, 0x5a },	/* 'Y' => 'Z' */
33
+	{ 0x5a, 0x59 },	/* 'Z' => 'Y' */
34
+	{ 0x5b, 0x40 },	/* '[' => '@' */
35
+	{ 0x5c, 0x23 },	/* '\\' => '#' */
36
+	{ 0x5d, 0x2b },	/* ']' => '+' */
37
+	{ 0x5e, 0x26 },	/* '^' => '&' */
38
+	{ 0x5f, 0x3f },	/* '_' => '?' */
39
+	{ 0x60, 0x5e },	/* '`' => '^' */
40
+	{ 0x79, 0x7a },	/* 'y' => 'z' */
41
+	{ 0x7a, 0x79 },	/* 'z' => 'y' */
42
+	{ 0x7b, 0x5c },	/* '{' => '\\' */
43
+	{ 0x7c, 0x27 },	/* '|' => '\'' */
44
+	{ 0x7d, 0x2a },	/* '}' => '*' */
45
+};

+ 30
- 0
src/hci/keymap/keymap_dk.c Bestand weergeven

@@ -0,0 +1,30 @@
1
+/** @file
2
+ *
3
+ * "dk" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "dk" keyboard mapping */
14
+struct key_mapping dk_mapping[] __keymap = {
15
+	{ 0x26, 0x2f },	/* '&' => '/' */
16
+	{ 0x28, 0x29 },	/* '(' => ')' */
17
+	{ 0x29, 0x3d },	/* ')' => '=' */
18
+	{ 0x2a, 0x28 },	/* '*' => '(' */
19
+	{ 0x2b, 0x60 },	/* '+' => '`' */
20
+	{ 0x2d, 0x2b },	/* '-' => '+' */
21
+	{ 0x2f, 0x2d },	/* '/' => '-' */
22
+	{ 0x3e, 0x3a },	/* '>' => ':' */
23
+	{ 0x3f, 0x5f },	/* '?' => '_' */
24
+	{ 0x40, 0x22 },	/* '@' => '"' */
25
+	{ 0x5c, 0x27 },	/* '\\' => '\'' */
26
+	{ 0x5e, 0x26 },	/* '^' => '&' */
27
+	{ 0x5f, 0x3f },	/* '_' => '?' */
28
+	{ 0x7c, 0x2a },	/* '|' => '*' */
29
+	{ 0x7d, 0x5e },	/* '}' => '^' */
30
+};

+ 28
- 0
src/hci/keymap/keymap_es.c Bestand weergeven

@@ -0,0 +1,28 @@
1
+/** @file
2
+ *
3
+ * "es" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "es" keyboard mapping */
14
+struct key_mapping es_mapping[] __keymap = {
15
+	{ 0x26, 0x2f },	/* '&' => '/' */
16
+	{ 0x28, 0x29 },	/* '(' => ')' */
17
+	{ 0x29, 0x3d },	/* ')' => '=' */
18
+	{ 0x2a, 0x28 },	/* '*' => '(' */
19
+	{ 0x2d, 0x27 },	/* '-' => '\'' */
20
+	{ 0x2f, 0x2d },	/* '/' => '-' */
21
+	{ 0x3e, 0x3a },	/* '>' => ':' */
22
+	{ 0x3f, 0x5f },	/* '?' => '_' */
23
+	{ 0x40, 0x22 },	/* '@' => '"' */
24
+	{ 0x5d, 0x2b },	/* ']' => '+' */
25
+	{ 0x5e, 0x26 },	/* '^' => '&' */
26
+	{ 0x5f, 0x3f },	/* '_' => '?' */
27
+	{ 0x7d, 0x2a },	/* '}' => '*' */
28
+};

+ 28
- 0
src/hci/keymap/keymap_et.c Bestand weergeven

@@ -0,0 +1,28 @@
1
+/** @file
2
+ *
3
+ * "et" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "et" keyboard mapping */
14
+struct key_mapping et_mapping[] __keymap = {
15
+	{ 0x26, 0x2f },	/* '&' => '/' */
16
+	{ 0x28, 0x29 },	/* '(' => ')' */
17
+	{ 0x29, 0x3d },	/* ')' => '=' */
18
+	{ 0x2a, 0x28 },	/* '*' => '(' */
19
+	{ 0x2d, 0x2b },	/* '-' => '+' */
20
+	{ 0x2f, 0x2d },	/* '/' => '-' */
21
+	{ 0x3e, 0x3a },	/* '>' => ':' */
22
+	{ 0x3f, 0x5f },	/* '?' => '_' */
23
+	{ 0x40, 0x22 },	/* '@' => '"' */
24
+	{ 0x5c, 0x27 },	/* '\\' => '\'' */
25
+	{ 0x5e, 0x26 },	/* '^' => '&' */
26
+	{ 0x5f, 0x3f },	/* '_' => '?' */
27
+	{ 0x7c, 0x2a },	/* '|' => '*' */
28
+};

+ 37
- 0
src/hci/keymap/keymap_fi.c Bestand weergeven

@@ -0,0 +1,37 @@
1
+/** @file
2
+ *
3
+ * "fi" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "fi" keyboard mapping */
14
+struct key_mapping fi_mapping[] __keymap = {
15
+	{ 0x22, 0x5b },	/* '"' => '[' */
16
+	{ 0x26, 0x2f },	/* '&' => '/' */
17
+	{ 0x27, 0x7b },	/* '\'' => '{' */
18
+	{ 0x28, 0x29 },	/* '(' => ')' */
19
+	{ 0x29, 0x3d },	/* ')' => '=' */
20
+	{ 0x2a, 0x28 },	/* '*' => '(' */
21
+	{ 0x2b, 0x60 },	/* '+' => '`' */
22
+	{ 0x2d, 0x2b },	/* '-' => '+' */
23
+	{ 0x2f, 0x2d },	/* '/' => '-' */
24
+	{ 0x3a, 0x5c },	/* ':' => '\\' */
25
+	{ 0x3b, 0x7c },	/* ';' => '|' */
26
+	{ 0x3d, 0x27 },	/* '=' => '\'' */
27
+	{ 0x3e, 0x3a },	/* '>' => ':' */
28
+	{ 0x3f, 0x5f },	/* '?' => '_' */
29
+	{ 0x40, 0x22 },	/* '@' => '"' */
30
+	{ 0x5b, 0x7d },	/* '[' => '}' */
31
+	{ 0x5c, 0x27 },	/* '\\' => '\'' */
32
+	{ 0x5e, 0x26 },	/* '^' => '&' */
33
+	{ 0x5f, 0x3f },	/* '_' => '?' */
34
+	{ 0x7b, 0x5d },	/* '{' => ']' */
35
+	{ 0x7c, 0x2a },	/* '|' => '*' */
36
+	{ 0x7d, 0x5e },	/* '}' => '^' */
37
+};

+ 67
- 0
src/hci/keymap/keymap_fr.c Bestand weergeven

@@ -0,0 +1,67 @@
1
+/** @file
2
+ *
3
+ * "fr" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "fr" keyboard mapping */
14
+struct key_mapping fr_mapping[] __keymap = {
15
+	{ 0x01, 0x11 },	/* Ctrl-A => Ctrl-Q */
16
+	{ 0x11, 0x01 },	/* Ctrl-Q => Ctrl-A */
17
+	{ 0x17, 0x1a },	/* Ctrl-W => Ctrl-Z */
18
+	{ 0x1a, 0x17 },	/* Ctrl-Z => Ctrl-W */
19
+	{ 0x21, 0x31 },	/* '!' => '1' */
20
+	{ 0x22, 0x25 },	/* '"' => '%' */
21
+	{ 0x23, 0x33 },	/* '#' => '3' */
22
+	{ 0x24, 0x34 },	/* '$' => '4' */
23
+	{ 0x25, 0x35 },	/* '%' => '5' */
24
+	{ 0x26, 0x37 },	/* '&' => '7' */
25
+	{ 0x27, 0x7c },	/* '\'' => '|' */
26
+	{ 0x28, 0x39 },	/* '(' => '9' */
27
+	{ 0x29, 0x30 },	/* ')' => '0' */
28
+	{ 0x2a, 0x38 },	/* '*' => '8' */
29
+	{ 0x2c, 0x3b },	/* ',' => ';' */
30
+	{ 0x2d, 0x29 },	/* '-' => ')' */
31
+	{ 0x2e, 0x3a },	/* '.' => ':' */
32
+	{ 0x2f, 0x21 },	/* '/' => '!' */
33
+	{ 0x30, 0x40 },	/* '0' => '@' */
34
+	{ 0x31, 0x26 },	/* '1' => '&' */
35
+	{ 0x32, 0x7b },	/* '2' => '{' */
36
+	{ 0x33, 0x22 },	/* '3' => '"' */
37
+	{ 0x34, 0x27 },	/* '4' => '\'' */
38
+	{ 0x35, 0x28 },	/* '5' => '(' */
39
+	{ 0x36, 0x2d },	/* '6' => '-' */
40
+	{ 0x37, 0x7d },	/* '7' => '}' */
41
+	{ 0x38, 0x5f },	/* '8' => '_' */
42
+	{ 0x39, 0x2f },	/* '9' => '/' */
43
+	{ 0x3a, 0x4d },	/* ':' => 'M' */
44
+	{ 0x3b, 0x6d },	/* ';' => 'm' */
45
+	{ 0x3e, 0x2f },	/* '>' => '/' */
46
+	{ 0x3f, 0x5c },	/* '?' => '\\' */
47
+	{ 0x40, 0x32 },	/* '@' => '2' */
48
+	{ 0x41, 0x51 },	/* 'A' => 'Q' */
49
+	{ 0x4d, 0x3f },	/* 'M' => '?' */
50
+	{ 0x51, 0x41 },	/* 'Q' => 'A' */
51
+	{ 0x57, 0x5a },	/* 'W' => 'Z' */
52
+	{ 0x5a, 0x57 },	/* 'Z' => 'W' */
53
+	{ 0x5b, 0x5e },	/* '[' => '^' */
54
+	{ 0x5c, 0x2a },	/* '\\' => '*' */
55
+	{ 0x5d, 0x24 },	/* ']' => '$' */
56
+	{ 0x5e, 0x36 },	/* '^' => '6' */
57
+	{ 0x5f, 0x5d },	/* '_' => ']' */
58
+	{ 0x60, 0x2a },	/* '`' => '*' */
59
+	{ 0x61, 0x71 },	/* 'a' => 'q' */
60
+	{ 0x6d, 0x2c },	/* 'm' => ',' */
61
+	{ 0x71, 0x61 },	/* 'q' => 'a' */
62
+	{ 0x77, 0x7a },	/* 'w' => 'z' */
63
+	{ 0x7a, 0x77 },	/* 'z' => 'w' */
64
+	{ 0x7b, 0x3c },	/* '{' => '<' */
65
+	{ 0x7c, 0x23 },	/* '|' => '#' */
66
+	{ 0x7d, 0x3e },	/* '}' => '>' */
67
+};

+ 15
- 0
src/hci/keymap/keymap_gr.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "gr" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "gr" keyboard mapping */
14
+struct key_mapping gr_mapping[] __keymap = {
15
+};

+ 34
- 0
src/hci/keymap/keymap_hu.c Bestand weergeven

@@ -0,0 +1,34 @@
1
+/** @file
2
+ *
3
+ * "hu" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "hu" keyboard mapping */
14
+struct key_mapping hu_mapping[] __keymap = {
15
+	{ 0x19, 0x1a },	/* Ctrl-Y => Ctrl-Z */
16
+	{ 0x1a, 0x19 },	/* Ctrl-Z => Ctrl-Y */
17
+	{ 0x21, 0x27 },	/* '!' => '\'' */
18
+	{ 0x23, 0x2b },	/* '#' => '+' */
19
+	{ 0x24, 0x21 },	/* '$' => '!' */
20
+	{ 0x26, 0x3d },	/* '&' => '=' */
21
+	{ 0x28, 0x29 },	/* '(' => ')' */
22
+	{ 0x2a, 0x28 },	/* '*' => '(' */
23
+	{ 0x2f, 0x2d },	/* '/' => '-' */
24
+	{ 0x3c, 0x3f },	/* '<' => '?' */
25
+	{ 0x3e, 0x3a },	/* '>' => ':' */
26
+	{ 0x3f, 0x5f },	/* '?' => '_' */
27
+	{ 0x40, 0x22 },	/* '@' => '"' */
28
+	{ 0x59, 0x5a },	/* 'Y' => 'Z' */
29
+	{ 0x5a, 0x59 },	/* 'Z' => 'Y' */
30
+	{ 0x5e, 0x2f },	/* '^' => '/' */
31
+	{ 0x60, 0x30 },	/* '`' => '0' */
32
+	{ 0x79, 0x7a },	/* 'y' => 'z' */
33
+	{ 0x7a, 0x79 },	/* 'z' => 'y' */
34
+};

+ 15
- 0
src/hci/keymap/keymap_il.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "il" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "il" keyboard mapping */
14
+struct key_mapping il_mapping[] __keymap = {
15
+};

+ 31
- 0
src/hci/keymap/keymap_it.c Bestand weergeven

@@ -0,0 +1,31 @@
1
+/** @file
2
+ *
3
+ * "it" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "it" keyboard mapping */
14
+struct key_mapping it_mapping[] __keymap = {
15
+	{ 0x26, 0x2f },	/* '&' => '/' */
16
+	{ 0x28, 0x29 },	/* '(' => ')' */
17
+	{ 0x29, 0x3d },	/* ')' => '=' */
18
+	{ 0x2a, 0x28 },	/* '*' => '(' */
19
+	{ 0x2b, 0x5e },	/* '+' => '^' */
20
+	{ 0x2d, 0x27 },	/* '-' => '\'' */
21
+	{ 0x2f, 0x2d },	/* '/' => '-' */
22
+	{ 0x3e, 0x3a },	/* '>' => ':' */
23
+	{ 0x3f, 0x5f },	/* '?' => '_' */
24
+	{ 0x40, 0x22 },	/* '@' => '"' */
25
+	{ 0x5d, 0x2b },	/* ']' => '+' */
26
+	{ 0x5e, 0x26 },	/* '^' => '&' */
27
+	{ 0x5f, 0x3f },	/* '_' => '?' */
28
+	{ 0x60, 0x5c },	/* '`' => '\\' */
29
+	{ 0x7d, 0x2a },	/* '}' => '*' */
30
+	{ 0x7e, 0x7c },	/* '~' => '|' */
31
+};

+ 16
- 0
src/hci/keymap/keymap_lt.c Bestand weergeven

@@ -0,0 +1,16 @@
1
+/** @file
2
+ *
3
+ * "lt" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "lt" keyboard mapping */
14
+struct key_mapping lt_mapping[] __keymap = {
15
+	{ 0x7f, 0x08 },	/* 0x7f => Ctrl-H */
16
+};

+ 15
- 0
src/hci/keymap/keymap_mk.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "mk" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "mk" keyboard mapping */
14
+struct key_mapping mk_mapping[] __keymap = {
15
+};

+ 21
- 0
src/hci/keymap/keymap_mt.c Bestand weergeven

@@ -0,0 +1,21 @@
1
+/** @file
2
+ *
3
+ * "mt" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "mt" keyboard mapping */
14
+struct key_mapping mt_mapping[] __keymap = {
15
+	{ 0x22, 0x40 },	/* '"' => '@' */
16
+	{ 0x23, 0x04 },	/* '#' => Ctrl-D */
17
+	{ 0x40, 0x22 },	/* '@' => '"' */
18
+	{ 0x5c, 0x23 },	/* '\\' => '#' */
19
+	{ 0x7c, 0x7e },	/* '|' => '~' */
20
+	{ 0x7f, 0x08 },	/* 0x7f => Ctrl-H */
21
+};

+ 34
- 0
src/hci/keymap/keymap_nl.c Bestand weergeven

@@ -0,0 +1,34 @@
1
+/** @file
2
+ *
3
+ * "nl" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "nl" keyboard mapping */
14
+struct key_mapping nl_mapping[] __keymap = {
15
+	{ 0x26, 0x5f },	/* '&' => '_' */
16
+	{ 0x28, 0x29 },	/* '(' => ')' */
17
+	{ 0x29, 0x27 },	/* ')' => '\'' */
18
+	{ 0x2a, 0x28 },	/* '*' => '(' */
19
+	{ 0x2b, 0x7e },	/* '+' => '~' */
20
+	{ 0x2d, 0x2f },	/* '-' => '/' */
21
+	{ 0x2f, 0x2d },	/* '/' => '-' */
22
+	{ 0x3b, 0x2b },	/* ';' => '+' */
23
+	{ 0x3c, 0x5d },	/* '<' => ']' */
24
+	{ 0x3e, 0x3a },	/* '>' => ':' */
25
+	{ 0x3f, 0x3d },	/* '?' => '=' */
26
+	{ 0x40, 0x22 },	/* '@' => '"' */
27
+	{ 0x5c, 0x3c },	/* '\\' => '<' */
28
+	{ 0x5d, 0x2a },	/* ']' => '*' */
29
+	{ 0x5e, 0x26 },	/* '^' => '&' */
30
+	{ 0x5f, 0x3f },	/* '_' => '?' */
31
+	{ 0x60, 0x40 },	/* '`' => '@' */
32
+	{ 0x7c, 0x3e },	/* '|' => '>' */
33
+	{ 0x7d, 0x7c },	/* '}' => '|' */
34
+};

+ 105
- 0
src/hci/keymap/keymap_no.c Bestand weergeven

@@ -0,0 +1,105 @@
1
+/** @file
2
+ *
3
+ * "no" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "no" keyboard mapping */
14
+struct key_mapping no_mapping[] __keymap = {
15
+	{ 0x02, 0x18 },	/* Ctrl-B => Ctrl-X */
16
+	{ 0x03, 0x0a },	/* Ctrl-C => Ctrl-J */
17
+	{ 0x04, 0x05 },	/* Ctrl-D => Ctrl-E */
18
+	{ 0x06, 0x15 },	/* Ctrl-F => Ctrl-U */
19
+	{ 0x07, 0x09 },	/* Ctrl-G => Ctrl-I */
20
+	{ 0x08, 0x04 },	/* Ctrl-H => Ctrl-D */
21
+	{ 0x0a, 0x08 },	/* Ctrl-J => Ctrl-H */
22
+	{ 0x0b, 0x14 },	/* Ctrl-K => Ctrl-T */
23
+	{ 0x0c, 0x0e },	/* Ctrl-L => Ctrl-N */
24
+	{ 0x0e, 0x02 },	/* Ctrl-N => Ctrl-B */
25
+	{ 0x0f, 0x12 },	/* Ctrl-O => Ctrl-R */
26
+	{ 0x10, 0x0c },	/* Ctrl-P => Ctrl-L */
27
+	{ 0x12, 0x10 },	/* Ctrl-R => Ctrl-P */
28
+	{ 0x13, 0x0f },	/* Ctrl-S => Ctrl-O */
29
+	{ 0x14, 0x19 },	/* Ctrl-T => Ctrl-Y */
30
+	{ 0x15, 0x07 },	/* Ctrl-U => Ctrl-G */
31
+	{ 0x16, 0x0b },	/* Ctrl-V => Ctrl-K */
32
+	{ 0x18, 0x11 },	/* Ctrl-X => Ctrl-Q */
33
+	{ 0x19, 0x06 },	/* Ctrl-Y => Ctrl-F */
34
+	{ 0x22, 0x5f },	/* '"' => '_' */
35
+	{ 0x26, 0x2f },	/* '&' => '/' */
36
+	{ 0x27, 0x2d },	/* '\'' => '-' */
37
+	{ 0x28, 0x29 },	/* '(' => ')' */
38
+	{ 0x29, 0x3d },	/* ')' => '=' */
39
+	{ 0x2a, 0x28 },	/* '*' => '(' */
40
+	{ 0x2b, 0x60 },	/* '+' => '`' */
41
+	{ 0x2c, 0x77 },	/* ',' => 'w' */
42
+	{ 0x2d, 0x2b },	/* '-' => '+' */
43
+	{ 0x2e, 0x76 },	/* '.' => 'v' */
44
+	{ 0x2f, 0x7a },	/* '/' => 'z' */
45
+	{ 0x3a, 0x53 },	/* ':' => 'S' */
46
+	{ 0x3b, 0x73 },	/* ';' => 's' */
47
+	{ 0x3c, 0x57 },	/* '<' => 'W' */
48
+	{ 0x3d, 0x5c },	/* '=' => '\\' */
49
+	{ 0x3e, 0x56 },	/* '>' => 'V' */
50
+	{ 0x3f, 0x5a },	/* '?' => 'Z' */
51
+	{ 0x40, 0x22 },	/* '@' => '"' */
52
+	{ 0x42, 0x58 },	/* 'B' => 'X' */
53
+	{ 0x43, 0x4a },	/* 'C' => 'J' */
54
+	{ 0x44, 0x45 },	/* 'D' => 'E' */
55
+	{ 0x45, 0x3a },	/* 'E' => ':' */
56
+	{ 0x46, 0x55 },	/* 'F' => 'U' */
57
+	{ 0x47, 0x49 },	/* 'G' => 'I' */
58
+	{ 0x48, 0x44 },	/* 'H' => 'D' */
59
+	{ 0x49, 0x43 },	/* 'I' => 'C' */
60
+	{ 0x4a, 0x48 },	/* 'J' => 'H' */
61
+	{ 0x4b, 0x54 },	/* 'K' => 'T' */
62
+	{ 0x4c, 0x4e },	/* 'L' => 'N' */
63
+	{ 0x4e, 0x42 },	/* 'N' => 'B' */
64
+	{ 0x4f, 0x52 },	/* 'O' => 'R' */
65
+	{ 0x50, 0x4c },	/* 'P' => 'L' */
66
+	{ 0x52, 0x50 },	/* 'R' => 'P' */
67
+	{ 0x53, 0x4f },	/* 'S' => 'O' */
68
+	{ 0x54, 0x59 },	/* 'T' => 'Y' */
69
+	{ 0x55, 0x47 },	/* 'U' => 'G' */
70
+	{ 0x56, 0x4b },	/* 'V' => 'K' */
71
+	{ 0x57, 0x3b },	/* 'W' => ';' */
72
+	{ 0x58, 0x51 },	/* 'X' => 'Q' */
73
+	{ 0x59, 0x46 },	/* 'Y' => 'F' */
74
+	{ 0x5b, 0x27 },	/* '[' => '\'' */
75
+	{ 0x5c, 0x3c },	/* '\\' => '<' */
76
+	{ 0x5d, 0x7e },	/* ']' => '~' */
77
+	{ 0x5e, 0x26 },	/* '^' => '&' */
78
+	{ 0x5f, 0x3f },	/* '_' => '?' */
79
+	{ 0x60, 0x7c },	/* '`' => '|' */
80
+	{ 0x62, 0x78 },	/* 'b' => 'x' */
81
+	{ 0x63, 0x6a },	/* 'c' => 'j' */
82
+	{ 0x64, 0x65 },	/* 'd' => 'e' */
83
+	{ 0x65, 0x2e },	/* 'e' => '.' */
84
+	{ 0x66, 0x75 },	/* 'f' => 'u' */
85
+	{ 0x67, 0x69 },	/* 'g' => 'i' */
86
+	{ 0x68, 0x64 },	/* 'h' => 'd' */
87
+	{ 0x69, 0x63 },	/* 'i' => 'c' */
88
+	{ 0x6a, 0x68 },	/* 'j' => 'h' */
89
+	{ 0x6b, 0x74 },	/* 'k' => 't' */
90
+	{ 0x6c, 0x6e },	/* 'l' => 'n' */
91
+	{ 0x6e, 0x62 },	/* 'n' => 'b' */
92
+	{ 0x6f, 0x72 },	/* 'o' => 'r' */
93
+	{ 0x70, 0x6c },	/* 'p' => 'l' */
94
+	{ 0x72, 0x70 },	/* 'r' => 'p' */
95
+	{ 0x73, 0x6f },	/* 's' => 'o' */
96
+	{ 0x74, 0x79 },	/* 't' => 'y' */
97
+	{ 0x75, 0x67 },	/* 'u' => 'g' */
98
+	{ 0x76, 0x6b },	/* 'v' => 'k' */
99
+	{ 0x77, 0x2c },	/* 'w' => ',' */
100
+	{ 0x78, 0x71 },	/* 'x' => 'q' */
101
+	{ 0x79, 0x66 },	/* 'y' => 'f' */
102
+	{ 0x7b, 0x2a },	/* '{' => '*' */
103
+	{ 0x7c, 0x3e },	/* '|' => '>' */
104
+	{ 0x7d, 0x5e },	/* '}' => '^' */
105
+};

+ 15
- 0
src/hci/keymap/keymap_pl.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "pl" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "pl" keyboard mapping */
14
+struct key_mapping pl_mapping[] __keymap = {
15
+};

+ 29
- 0
src/hci/keymap/keymap_pt.c Bestand weergeven

@@ -0,0 +1,29 @@
1
+/** @file
2
+ *
3
+ * "pt" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "pt" keyboard mapping */
14
+struct key_mapping pt_mapping[] __keymap = {
15
+	{ 0x1c, 0x1d },	/* 0x1c => 0x1d */
16
+	{ 0x1d, 0x1b },	/* 0x1d => 0x1b */
17
+	{ 0x22, 0x5e },	/* '"' => '^' */
18
+	{ 0x27, 0x7e },	/* '\'' => '~' */
19
+	{ 0x2f, 0x3b },	/* '/' => ';' */
20
+	{ 0x3f, 0x3a },	/* '?' => ':' */
21
+	{ 0x5b, 0x27 },	/* '[' => '\'' */
22
+	{ 0x5c, 0x5d },	/* '\\' => ']' */
23
+	{ 0x5d, 0x5b },	/* ']' => '[' */
24
+	{ 0x60, 0x27 },	/* '`' => '\'' */
25
+	{ 0x7b, 0x60 },	/* '{' => '`' */
26
+	{ 0x7c, 0x7d },	/* '|' => '}' */
27
+	{ 0x7d, 0x7b },	/* '}' => '{' */
28
+	{ 0x7e, 0x22 },	/* '~' => '"' */
29
+};

+ 15
- 0
src/hci/keymap/keymap_ro.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "ro" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "ro" keyboard mapping */
14
+struct key_mapping ro_mapping[] __keymap = {
15
+};

+ 15
- 0
src/hci/keymap/keymap_ru.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "ru" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "ru" keyboard mapping */
14
+struct key_mapping ru_mapping[] __keymap = {
15
+};

+ 40
- 0
src/hci/keymap/keymap_sg.c Bestand weergeven

@@ -0,0 +1,40 @@
1
+/** @file
2
+ *
3
+ * "sg" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "sg" keyboard mapping */
14
+struct key_mapping sg_mapping[] __keymap = {
15
+	{ 0x19, 0x1a },	/* Ctrl-Y => Ctrl-Z */
16
+	{ 0x1a, 0x19 },	/* Ctrl-Z => Ctrl-Y */
17
+	{ 0x21, 0x2b },	/* '!' => '+' */
18
+	{ 0x23, 0x2a },	/* '#' => '*' */
19
+	{ 0x24, 0x34 },	/* '$' => '4' */
20
+	{ 0x26, 0x2f },	/* '&' => '/' */
21
+	{ 0x28, 0x29 },	/* '(' => ')' */
22
+	{ 0x29, 0x3d },	/* ')' => '=' */
23
+	{ 0x2a, 0x28 },	/* '*' => '(' */
24
+	{ 0x2b, 0x60 },	/* '+' => '`' */
25
+	{ 0x2d, 0x27 },	/* '-' => '\'' */
26
+	{ 0x2f, 0x2d },	/* '/' => '-' */
27
+	{ 0x3d, 0x5e },	/* '=' => '^' */
28
+	{ 0x3e, 0x3a },	/* '>' => ':' */
29
+	{ 0x3f, 0x5f },	/* '?' => '_' */
30
+	{ 0x40, 0x22 },	/* '@' => '"' */
31
+	{ 0x59, 0x5a },	/* 'Y' => 'Z' */
32
+	{ 0x5a, 0x59 },	/* 'Z' => 'Y' */
33
+	{ 0x5c, 0x24 },	/* '\\' => '$' */
34
+	{ 0x5e, 0x26 },	/* '^' => '&' */
35
+	{ 0x5f, 0x3f },	/* '_' => '?' */
36
+	{ 0x79, 0x7a },	/* 'y' => 'z' */
37
+	{ 0x7a, 0x79 },	/* 'z' => 'y' */
38
+	{ 0x7c, 0x24 },	/* '|' => '$' */
39
+	{ 0x7d, 0x21 },	/* '}' => '!' */
40
+};

+ 34
- 0
src/hci/keymap/keymap_sr.c Bestand weergeven

@@ -0,0 +1,34 @@
1
+/** @file
2
+ *
3
+ * "sr" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "sr" keyboard mapping */
14
+struct key_mapping sr_mapping[] __keymap = {
15
+	{ 0x19, 0x1a },	/* Ctrl-Y => Ctrl-Z */
16
+	{ 0x1a, 0x19 },	/* Ctrl-Z => Ctrl-Y */
17
+	{ 0x26, 0x2f },	/* '&' => '/' */
18
+	{ 0x28, 0x29 },	/* '(' => ')' */
19
+	{ 0x29, 0x3d },	/* ')' => '=' */
20
+	{ 0x2a, 0x28 },	/* '*' => '(' */
21
+	{ 0x2b, 0x2a },	/* '+' => '*' */
22
+	{ 0x2d, 0x27 },	/* '-' => '\'' */
23
+	{ 0x2f, 0x2d },	/* '/' => '-' */
24
+	{ 0x3d, 0x2b },	/* '=' => '+' */
25
+	{ 0x3e, 0x3a },	/* '>' => ':' */
26
+	{ 0x3f, 0x5f },	/* '?' => '_' */
27
+	{ 0x40, 0x22 },	/* '@' => '"' */
28
+	{ 0x59, 0x5a },	/* 'Y' => 'Z' */
29
+	{ 0x5a, 0x59 },	/* 'Z' => 'Y' */
30
+	{ 0x5e, 0x26 },	/* '^' => '&' */
31
+	{ 0x5f, 0x3f },	/* '_' => '?' */
32
+	{ 0x79, 0x7a },	/* 'y' => 'z' */
33
+	{ 0x7a, 0x79 },	/* 'z' => 'y' */
34
+};

+ 16
- 0
src/hci/keymap/keymap_th.c Bestand weergeven

@@ -0,0 +1,16 @@
1
+/** @file
2
+ *
3
+ * "th" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "th" keyboard mapping */
14
+struct key_mapping th_mapping[] __keymap = {
15
+	{ 0x7f, 0x08 },	/* 0x7f => Ctrl-H */
16
+};

+ 16
- 0
src/hci/keymap/keymap_ua.c Bestand weergeven

@@ -0,0 +1,16 @@
1
+/** @file
2
+ *
3
+ * "ua" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "ua" keyboard mapping */
14
+struct key_mapping ua_mapping[] __keymap = {
15
+	{ 0x7f, 0x08 },	/* 0x7f => Ctrl-H */
16
+};

+ 20
- 0
src/hci/keymap/keymap_uk.c Bestand weergeven

@@ -0,0 +1,20 @@
1
+/** @file
2
+ *
3
+ * "uk" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "uk" keyboard mapping */
14
+struct key_mapping uk_mapping[] __keymap = {
15
+	{ 0x22, 0x40 },	/* '"' => '@' */
16
+	{ 0x3c, 0x5c },	/* '<' => '\\' */
17
+	{ 0x40, 0x22 },	/* '@' => '"' */
18
+	{ 0x5c, 0x23 },	/* '\\' => '#' */
19
+	{ 0x7c, 0x7e },	/* '|' => '~' */
20
+};

+ 15
- 0
src/hci/keymap/keymap_us.c Bestand weergeven

@@ -0,0 +1,15 @@
1
+/** @file
2
+ *
3
+ * "us" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "us" keyboard mapping */
14
+struct key_mapping us_mapping[] __keymap = {
15
+};

+ 54
- 0
src/hci/keymap/keymap_wo.c Bestand weergeven

@@ -0,0 +1,54 @@
1
+/** @file
2
+ *
3
+ * "wo" keyboard mapping
4
+ *
5
+ * This file is automatically generated; do not edit
6
+ *
7
+ */
8
+
9
+FILE_LICENCE ( PUBLIC_DOMAIN );
10
+
11
+#include <ipxe/keymap.h>
12
+
13
+/** "wo" keyboard mapping */
14
+struct key_mapping wo_mapping[] __keymap = {
15
+	{ 0x01, 0x11 },	/* Ctrl-A => Ctrl-Q */
16
+	{ 0x11, 0x01 },	/* Ctrl-Q => Ctrl-A */
17
+	{ 0x17, 0x1a },	/* Ctrl-W => Ctrl-Z */
18
+	{ 0x1a, 0x17 },	/* Ctrl-Z => Ctrl-W */
19
+	{ 0x21, 0x31 },	/* '!' => '1' */
20
+	{ 0x23, 0x33 },	/* '#' => '3' */
21
+	{ 0x24, 0x34 },	/* '$' => '4' */
22
+	{ 0x25, 0x35 },	/* '%' => '5' */
23
+	{ 0x26, 0x37 },	/* '&' => '7' */
24
+	{ 0x28, 0x39 },	/* '(' => '9' */
25
+	{ 0x29, 0x30 },	/* ')' => '0' */
26
+	{ 0x2a, 0x38 },	/* '*' => '8' */
27
+	{ 0x2c, 0x3b },	/* ',' => ';' */
28
+	{ 0x2d, 0x29 },	/* '-' => ')' */
29
+	{ 0x2e, 0x3a },	/* '.' => ':' */
30
+	{ 0x2f, 0x21 },	/* '/' => '!' */
31
+	{ 0x31, 0x26 },	/* '1' => '&' */
32
+	{ 0x33, 0x22 },	/* '3' => '"' */
33
+	{ 0x34, 0x27 },	/* '4' => '\'' */
34
+	{ 0x35, 0x28 },	/* '5' => '(' */
35
+	{ 0x36, 0x2d },	/* '6' => '-' */
36
+	{ 0x38, 0x5f },	/* '8' => '_' */
37
+	{ 0x3a, 0x4d },	/* ':' => 'M' */
38
+	{ 0x3b, 0x6d },	/* ';' => 'm' */
39
+	{ 0x3e, 0x2f },	/* '>' => '/' */
40
+	{ 0x40, 0x32 },	/* '@' => '2' */
41
+	{ 0x41, 0x51 },	/* 'A' => 'Q' */
42
+	{ 0x4d, 0x3f },	/* 'M' => '?' */
43
+	{ 0x51, 0x41 },	/* 'Q' => 'A' */
44
+	{ 0x57, 0x5a },	/* 'W' => 'Z' */
45
+	{ 0x5a, 0x57 },	/* 'Z' => 'W' */
46
+	{ 0x5d, 0x24 },	/* ']' => '$' */
47
+	{ 0x5e, 0x36 },	/* '^' => '6' */
48
+	{ 0x61, 0x71 },	/* 'a' => 'q' */
49
+	{ 0x6d, 0x2c },	/* 'm' => ',' */
50
+	{ 0x71, 0x61 },	/* 'q' => 'a' */
51
+	{ 0x77, 0x7a },	/* 'w' => 'z' */
52
+	{ 0x7a, 0x77 },	/* 'z' => 'w' */
53
+	{ 0x7e, 0x25 },	/* '~' => '%' */
54
+};

+ 224
- 0
src/util/genkeymap.pl Bestand weergeven

@@ -0,0 +1,224 @@
1
+#!/usr/bin/perl -w
2
+#
3
+# Copyright (C) 2011 Michael Brown <mbrown@fensystems.co.uk>.
4
+#
5
+# This program is free software; you can redistribute it and/or
6
+# modify it under the terms of the GNU General Public License as
7
+# published by the Free Software Foundation; either version 2 of the
8
+# License, or any later version.
9
+#
10
+# This program is distributed in the hope that it will be useful, but
11
+# WITHOUT ANY WARRANTY; without even the implied warranty of
12
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
+# General Public License for more details.
14
+#
15
+# You should have received a copy of the GNU General Public License
16
+# along with this program; if not, write to the Free Software
17
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
+
19
+=head1 NAME
20
+
21
+genkeymap.pl
22
+
23
+=head1 SYNOPSIS
24
+
25
+genkeymap.pl [options] <keymap name>
26
+
27
+Options:
28
+
29
+    -f,--from=<name>	Set BIOS keymap name (default "us")
30
+    -h,--help		Display brief help message
31
+    -v,--verbose	Increase verbosity
32
+    -q,--quiet		Decrease verbosity
33
+
34
+=cut
35
+
36
+# With reference to:
37
+#
38
+# http://gunnarwrobel.de/wiki/Linux-and-the-keyboard.html
39
+
40
+use Getopt::Long;
41
+use Pod::Usage;
42
+use strict;
43
+use warnings;
44
+
45
+use constant BIOS_KEYMAP => "us";
46
+use constant BKEYMAP_MAGIC => "bkeymap";
47
+use constant MAX_NR_KEYMAPS => 256;
48
+use constant NR_KEYS => 128;
49
+use constant KG_SHIFT => 0;
50
+use constant KG_ALTGR => 1;
51
+use constant KG_CTRL => 2;
52
+use constant KG_ALT => 3;
53
+use constant KG_SHIFTL => 4;
54
+use constant KG_KANASHIFT => 4;
55
+use constant KG_SHIFTR => 5;
56
+use constant KG_CTRLL => 6;
57
+use constant KG_CTRLR => 7;
58
+use constant KG_CAPSSHIFT => 8;
59
+use constant KT_LATIN => 0;
60
+use constant KT_FN => 1;
61
+use constant KT_SPEC => 2;
62
+use constant KT_PAD => 3;
63
+use constant KT_DEAD => 4;
64
+use constant KT_CONS => 5;
65
+use constant KT_CUR => 6;
66
+use constant KT_SHIFT => 7;
67
+use constant KT_META => 8;
68
+use constant KT_ASCII => 9;
69
+use constant KT_LOCK => 10;
70
+use constant KT_LETTER => 11;
71
+use constant KT_SLOCK => 12;
72
+use constant KT_SPKUP => 14;
73
+
74
+my $verbosity = 1;
75
+my $from_name = BIOS_KEYMAP;
76
+
77
+# Read named keymaps using "loadkeys -b"
78
+#
79
+sub read_keymaps {
80
+  my $name = shift;
81
+  my $keymaps = [];
82
+
83
+  # Generate binary keymap
84
+  open my $pipe, "-|", "loadkeys", "-b", $name
85
+      or die "Could not load keymap \"".$name."\": $!\n";
86
+
87
+  # Check magic
88
+  read $pipe, my $magic, length BKEYMAP_MAGIC
89
+      or die "Could not read from \"".$name."\": $!\n";
90
+  die "Bad magic value from \"".$name."\"\n"
91
+      unless $magic eq BKEYMAP_MAGIC;
92
+
93
+  # Read list of included keymaps
94
+  read $pipe, my $included, MAX_NR_KEYMAPS
95
+      or die "Could not read from \"".$name."\": $!\n";
96
+  my @included = unpack ( "C*", $included );
97
+  die "Missing or truncated keymap list from \"".$name."\"\n"
98
+      unless @included == MAX_NR_KEYMAPS;
99
+
100
+  # Read each keymap in turn
101
+  for ( my $keymap = 0 ; $keymap < MAX_NR_KEYMAPS ; $keymap++ ) {
102
+    if ( $included[$keymap] ) {
103
+      read $pipe, my $keysyms, ( NR_KEYS * 2 )
104
+	  or die "Could not read from \"".$name."\": $!\n";
105
+      my @keysyms = unpack ( "S*", $keysyms );
106
+      die "Missing or truncated keymap ".$keymap." from \"".$name."\"\n"
107
+	  unless @keysyms == NR_KEYS;
108
+      push @$keymaps, \@keysyms;
109
+    } else {
110
+      push @$keymaps, undef;
111
+    }
112
+  }
113
+
114
+  close $pipe;
115
+  return $keymaps;
116
+}
117
+
118
+# Translate keysym value to ASCII
119
+#
120
+sub keysym_to_ascii {
121
+  my $keysym = shift;
122
+
123
+  # Non-existent keysyms have no ASCII equivalent
124
+  return unless $keysym;
125
+
126
+  # Sanity check
127
+  die "Unexpected keysym ".sprintf ( "0x%04x\n", $keysym )."\n"
128
+      if $keysym & 0xf000;
129
+
130
+  # Extract type and value
131
+  my $type = ( $keysym >> 8 );
132
+  my $value = ( $keysym & 0xff );
133
+
134
+  # Non-simple types have no ASCII equivalent
135
+  return unless ( ( $type == KT_LATIN ) || ( $type == KT_ASCII ) ||
136
+		  ( $type == KT_LETTER ) );
137
+
138
+  # High-bit-set characters cannot be generated on a US keyboard
139
+  return if $value & 0x80;
140
+
141
+  return $value;
142
+}
143
+
144
+# Translate ASCII to descriptive name
145
+#
146
+sub ascii_to_name {
147
+  my $ascii = shift;
148
+
149
+  if ( $ascii == 0x5c ) {
150
+    return "'\\\\'";
151
+  } elsif ( $ascii == 0x27 ) {
152
+    return "'\\\''";
153
+  } elsif ( ( $ascii >= 0x20 ) && ( $ascii <= 0x7e ) ) {
154
+    return sprintf ( "'%c'", $ascii );
155
+  } elsif ( $ascii <= 0x1a ) {
156
+    return sprintf ( "Ctrl-%c", ( 0x40 + $ascii ) );
157
+  } else {
158
+    return sprintf ( "0x%02x", $ascii );
159
+  }
160
+}
161
+
162
+# Produce translation table between two keymaps
163
+#
164
+sub translate_keymaps {
165
+  my $from = shift;
166
+  my $to = shift;
167
+  my $map = {};
168
+
169
+  foreach my $keymap ( 0, 1 << KG_SHIFT, 1 << KG_CTRL ) {
170
+    for ( my $keycode = 0 ; $keycode < NR_KEYS ; $keycode++ ) {
171
+      my $from_ascii = keysym_to_ascii ( $from->[$keymap]->[$keycode] )
172
+	  or next;
173
+      my $to_ascii = keysym_to_ascii ( $to->[$keymap]->[$keycode] )
174
+	  or next;
175
+      if ( ( $from_ascii != $to_ascii ) && $verbosity > 1 ) {
176
+	printf STDERR "In keymap %d: %s => %s%s\n", $keymap,
177
+	       ascii_to_name ( $from_ascii ), ascii_to_name ( $to_ascii ),
178
+	       ( $map->{$from_ascii} ? " (ignored)" : "" );
179
+      }
180
+      $map->{$from_ascii} ||= $to_ascii;
181
+    }
182
+  }
183
+  return $map;
184
+}
185
+
186
+# Parse command-line options
187
+Getopt::Long::Configure ( 'bundling', 'auto_abbrev' );
188
+GetOptions (
189
+  'verbose|v+' => sub { $verbosity++; },
190
+  'quiet|q+' => sub { $verbosity--; },
191
+  'from|f=s' => sub { shift; $from_name = shift; },
192
+  'help|h' => sub { pod2usage ( 1 ); },
193
+) or die "Could not parse command-line options\n";
194
+pod2usage ( 1 ) unless @ARGV == 1;
195
+my $to_name = shift;
196
+
197
+# Read and translate keymaps
198
+my $from = read_keymaps ( $from_name );
199
+my $to = read_keymaps ( $to_name );
200
+my $map = translate_keymaps ( $from, $to );
201
+
202
+# Generate output
203
+( my $to_name_c = $to_name ) =~ s/\W/_/g;
204
+printf "/** \@file\n";
205
+printf " *\n";
206
+printf " * \"".$to_name."\" keyboard mapping\n";
207
+printf " *\n";
208
+printf " * This file is automatically generated; do not edit\n";
209
+printf " *\n";
210
+printf " */\n";
211
+printf "\n";
212
+printf "FILE_LICENCE ( PUBLIC_DOMAIN );\n";
213
+printf "\n";
214
+printf "#include <ipxe/keymap.h>\n";
215
+printf "\n";
216
+printf "/** \"".$to_name."\" keyboard mapping */\n";
217
+printf "struct key_mapping ".$to_name_c."_mapping[] __keymap = {\n";
218
+foreach my $from_sym ( sort { $a <=> $b } keys %$map ) {
219
+  my $to_sym = $map->{$from_sym};
220
+  next if $from_sym == $to_sym;
221
+  printf "\t{ 0x%02x, 0x%02x },\t/* %s => %s */\n", $from_sym, $to_sym,
222
+	 ascii_to_name ( $from_sym ), ascii_to_name ( $to_sym );
223
+}
224
+printf "};\n";

Laden…
Annuleren
Opslaan