xref: /openbmc/qemu/include/hw/input/adb-keys.h (revision 709395f8)
1 /*
2  * QEMU System Emulator
3  *
4  * Copyright (c) 2016 John Arbuckle
5  *
6  * This work is licensed under the terms of the GNU GPL, version 2 or later.
7  * See the COPYING file in the top-level directory.
8  */
9 
10 /*
11  *  adb-keys.h
12  *
13  *  Provides an enum of all the Macintosh keycodes.
14  *  Additional information: http://www.archive.org/stream/apple-guide-macintosh-family-hardware/Apple_Guide_to_the_Macintosh_Family_Hardware_2e#page/n345/mode/2up
15  *                          page 308
16  */
17 
18 #ifndef ADB_KEYS_H
19 #define ADB_KEYS_H
20 
21 enum {
22     ADB_KEY_A = 0x00,
23     ADB_KEY_B = 0x0b,
24     ADB_KEY_C = 0x08,
25     ADB_KEY_D = 0x02,
26     ADB_KEY_E = 0x0e,
27     ADB_KEY_F = 0x03,
28     ADB_KEY_G = 0x05,
29     ADB_KEY_H = 0x04,
30     ADB_KEY_I = 0x22,
31     ADB_KEY_J = 0x26,
32     ADB_KEY_K = 0x28,
33     ADB_KEY_L = 0x25,
34     ADB_KEY_M = 0x2e,
35     ADB_KEY_N = 0x2d,
36     ADB_KEY_O = 0x1f,
37     ADB_KEY_P = 0x23,
38     ADB_KEY_Q = 0x0c,
39     ADB_KEY_R = 0x0f,
40     ADB_KEY_S = 0x01,
41     ADB_KEY_T = 0x11,
42     ADB_KEY_U = 0x20,
43     ADB_KEY_V = 0x09,
44     ADB_KEY_W = 0x0d,
45     ADB_KEY_X = 0x07,
46     ADB_KEY_Y = 0x10,
47     ADB_KEY_Z = 0x06,
48 
49     ADB_KEY_0 = 0x1d,
50     ADB_KEY_1 = 0x12,
51     ADB_KEY_2 = 0x13,
52     ADB_KEY_3 = 0x14,
53     ADB_KEY_4 = 0x15,
54     ADB_KEY_5 = 0x17,
55     ADB_KEY_6 = 0x16,
56     ADB_KEY_7 = 0x1a,
57     ADB_KEY_8 = 0x1c,
58     ADB_KEY_9 = 0x19,
59 
60     ADB_KEY_GRAVE_ACCENT = 0x32,
61     ADB_KEY_MINUS = 0x1b,
62     ADB_KEY_EQUAL = 0x18,
63     ADB_KEY_DELETE = 0x33,
64     ADB_KEY_CAPS_LOCK = 0x39,
65     ADB_KEY_TAB = 0x30,
66     ADB_KEY_RETURN = 0x24,
67     ADB_KEY_LEFT_BRACKET = 0x21,
68     ADB_KEY_RIGHT_BRACKET = 0x1e,
69     ADB_KEY_BACKSLASH = 0x2a,
70     ADB_KEY_SEMICOLON = 0x29,
71     ADB_KEY_APOSTROPHE = 0x27,
72     ADB_KEY_COMMA = 0x2b,
73     ADB_KEY_PERIOD = 0x2f,
74     ADB_KEY_FORWARD_SLASH = 0x2c,
75     ADB_KEY_LEFT_SHIFT = 0x38,
76     ADB_KEY_RIGHT_SHIFT = 0x7b,
77     ADB_KEY_SPACEBAR = 0x31,
78     ADB_KEY_LEFT_CONTROL = 0x36,
79     ADB_KEY_RIGHT_CONTROL = 0x7d,
80     ADB_KEY_LEFT_OPTION = 0x3a,
81     ADB_KEY_RIGHT_OPTION = 0x7c,
82     ADB_KEY_COMMAND = 0x37,
83 
84     ADB_KEY_KP_0 = 0x52,
85     ADB_KEY_KP_1 = 0x53,
86     ADB_KEY_KP_2 = 0x54,
87     ADB_KEY_KP_3 = 0x55,
88     ADB_KEY_KP_4 = 0x56,
89     ADB_KEY_KP_5 = 0x57,
90     ADB_KEY_KP_6 = 0x58,
91     ADB_KEY_KP_7 = 0x59,
92     ADB_KEY_KP_8 = 0x5b,
93     ADB_KEY_KP_9 = 0x5c,
94     ADB_KEY_KP_PERIOD = 0x41,
95     ADB_KEY_KP_ENTER = 0x4c,
96     ADB_KEY_KP_PLUS = 0x45,
97     ADB_KEY_KP_SUBTRACT = 0x4e,
98     ADB_KEY_KP_MULTIPLY = 0x43,
99     ADB_KEY_KP_DIVIDE = 0x4b,
100     ADB_KEY_KP_EQUAL = 0x51,
101     ADB_KEY_KP_CLEAR = 0x47,
102 
103     ADB_KEY_UP = 0x3e,
104     ADB_KEY_DOWN = 0x3d,
105     ADB_KEY_LEFT = 0x3b,
106     ADB_KEY_RIGHT = 0x3c,
107 
108     ADB_KEY_HELP = 0x72,
109     ADB_KEY_HOME = 0x73,
110     ADB_KEY_PAGE_UP = 0x74,
111     ADB_KEY_PAGE_DOWN = 0x79,
112     ADB_KEY_END = 0x77,
113     ADB_KEY_FORWARD_DELETE = 0x75,
114 
115     ADB_KEY_ESC = 0x35,
116     ADB_KEY_F1 = 0x7a,
117     ADB_KEY_F2 = 0x78,
118     ADB_KEY_F3 = 0x63,
119     ADB_KEY_F4 = 0x76,
120     ADB_KEY_F5 = 0x60,
121     ADB_KEY_F6 = 0x61,
122     ADB_KEY_F7 = 0x62,
123     ADB_KEY_F8 = 0x64,
124     ADB_KEY_F9 = 0x65,
125     ADB_KEY_F10 = 0x6d,
126     ADB_KEY_F11 = 0x67,
127     ADB_KEY_F12 = 0x6f,
128     ADB_KEY_F13 = 0x69,
129     ADB_KEY_F14 = 0x6b,
130     ADB_KEY_F15 = 0x71,
131 
132     ADB_KEY_VOLUME_UP = 0x48,
133     ADB_KEY_VOLUME_DOWN = 0x49,
134     ADB_KEY_VOLUME_MUTE = 0x4a,
135     ADB_KEY_POWER = 0x7f7f
136 };
137 
138 /* Could not find the value for this key. */
139 /* #define ADB_KEY_EJECT */
140 
141 #endif /* ADB_KEYS_H */
142