axle OS
x86_32 UNIX-like hobby OS
kb_us.h
1 #include "keymap.h"
2 
3 keymap_t kb_us = {
4 //normal keys
5 {
6  /* first row - indices 0 to 14 */
7  0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', '\b',
8 
9  /* second row - indices 15 to 28 */
10  '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', //Enter key
11 
12  /* 29 = Control, 30 - 41: third row */
13  0, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`',
14 
15  /* fourth row, indices 42 to 54, zeroes are shift-keys*/
16  0, '\\', 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', 0,
17 
18  '*',
19 
20  /* Special keys */
21 
22  0, //ALT - 56
23  ' ', // Space - 57
24  0, //Caps lock - 58
25  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // F1 to F10 - 59 to 68
26  0, //Num lock - 69
27  0, //Scroll lock - 70
28  0, //Home - 71
29  0, //Up arrow - 72
30  0, //Page up - 73
31  '-',
32  0, //Left arrow - 75
33  0,
34  0, //Right arrow -77
35  '+',
36  0, //End - 79
37  0, //Dowm arrow - 80
38  0, //Page down - 81
39  0, //Insert - 82
40  0, //Delete - 83
41  0, 0, 0,
42  0, //F11 - 87
43  0, //F12 - 88
44  0, //All others undefined
45 },
46 //caps
47 {
48  /* first row - indices 0 to 14 */
49  0, 27, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '\b',
50 
51  /* second row - indices 15 to 28 */
52  '\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\n', //Enter key
53 
54  /* 29 = Control, 30 - 41: third row */
55  0, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', '~',
56 
57  /* fourth row, indices 42 to 54, zeroes are shift-keys*/
58  0, '|', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?', 0,
59 
60  '*',
61 
62  /* Special keys */
63 
64  0, //ALT - 56
65  ' ', // Space - 57
66  0, //Caps lock - 58
67  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // F1 to F10 - 59 to 68
68  0, //Num lock - 69
69  0, //Scroll lock - 70
70  0, //Home - 71
71  0, //Up arrow - 72
72  0, //Page up - 73
73  '-',
74  0, //Left arrow - 75
75  0,
76  0, //Right arrow -77
77  '+',
78  0, //End - 79
79  0, //Dowm arrow - 80
80  0, //Page down - 81
81  0, //Insert - 82
82  0, //Delete - 83
83  0, 0, 0,
84  0, //F11 - 87
85  0, //F12 - 88
86  0, //All others undefined
87 },
88 
89 // control_map
90 {
91  29, // Ctrl
92  56, // Alt
93  0, // AltGr
94  42, // left Shift
95  54, // right Shift
96  58, // Caps lock
97  70, // Scroll lock
98  69 // Num lock
99 },
100 
101 //Set the initial status of all control keys to "not active"
102 0
103 };
104 
Definition: keymap.h:8