21 #ifndef __DC_MAPLE_KEYBOARD_H
22 #define __DC_MAPLE_KEYBOARD_H
24 #include <sys/cdefs.h>
36 #define KBD_MOD_LCTRL (1<<0)
37 #define KBD_MOD_LSHIFT (1<<1)
38 #define KBD_MOD_LALT (1<<2)
39 #define KBD_MOD_S1 (1<<3)
40 #define KBD_MOD_RCTRL (1<<4)
41 #define KBD_MOD_RSHIFT (1<<5)
42 #define KBD_MOD_RALT (1<<6)
43 #define KBD_MOD_S2 (1<<7)
53 #define KBD_LED_NUMLOCK (1<<0)
54 #define KBD_LED_CAPSLOCK (1<<1)
55 #define KBD_LED_SCRLOCK (1<<2)
64 #define KBD_KEY_NONE 0x00
65 #define KBD_KEY_ERROR 0x01
66 #define KBD_KEY_A 0x04
67 #define KBD_KEY_B 0x05
68 #define KBD_KEY_C 0x06
69 #define KBD_KEY_D 0x07
70 #define KBD_KEY_E 0x08
71 #define KBD_KEY_F 0x09
72 #define KBD_KEY_G 0x0a
73 #define KBD_KEY_H 0x0b
74 #define KBD_KEY_I 0x0c
75 #define KBD_KEY_J 0x0d
76 #define KBD_KEY_K 0x0e
77 #define KBD_KEY_L 0x0f
78 #define KBD_KEY_M 0x10
79 #define KBD_KEY_N 0x11
80 #define KBD_KEY_O 0x12
81 #define KBD_KEY_P 0x13
82 #define KBD_KEY_Q 0x14
83 #define KBD_KEY_R 0x15
84 #define KBD_KEY_S 0x16
85 #define KBD_KEY_T 0x17
86 #define KBD_KEY_U 0x18
87 #define KBD_KEY_V 0x19
88 #define KBD_KEY_W 0x1a
89 #define KBD_KEY_X 0x1b
90 #define KBD_KEY_Y 0x1c
91 #define KBD_KEY_Z 0x1d
92 #define KBD_KEY_1 0x1e
93 #define KBD_KEY_2 0x1f
94 #define KBD_KEY_3 0x20
95 #define KBD_KEY_4 0x21
96 #define KBD_KEY_5 0x22
97 #define KBD_KEY_6 0x23
98 #define KBD_KEY_7 0x24
99 #define KBD_KEY_8 0x25
100 #define KBD_KEY_9 0x26
101 #define KBD_KEY_0 0x27
102 #define KBD_KEY_ENTER 0x28
103 #define KBD_KEY_ESCAPE 0x29
104 #define KBD_KEY_BACKSPACE 0x2a
105 #define KBD_KEY_TAB 0x2b
106 #define KBD_KEY_SPACE 0x2c
107 #define KBD_KEY_MINUS 0x2d
108 #define KBD_KEY_PLUS 0x2e
109 #define KBD_KEY_LBRACKET 0x2f
110 #define KBD_KEY_RBRACKET 0x30
111 #define KBD_KEY_BACKSLASH 0x31
112 #define KBD_KEY_SEMICOLON 0x33
113 #define KBD_KEY_QUOTE 0x34
114 #define KBD_KEY_TILDE 0x35
115 #define KBD_KEY_COMMA 0x36
116 #define KBD_KEY_PERIOD 0x37
117 #define KBD_KEY_SLASH 0x38
118 #define KBD_KEY_CAPSLOCK 0x39
119 #define KBD_KEY_F1 0x3a
120 #define KBD_KEY_F2 0x3b
121 #define KBD_KEY_F3 0x3c
122 #define KBD_KEY_F4 0x3d
123 #define KBD_KEY_F5 0x3e
124 #define KBD_KEY_F6 0x3f
125 #define KBD_KEY_F7 0x40
126 #define KBD_KEY_F8 0x41
127 #define KBD_KEY_F9 0x42
128 #define KBD_KEY_F10 0x43
129 #define KBD_KEY_F11 0x44
130 #define KBD_KEY_F12 0x45
131 #define KBD_KEY_PRINT 0x46
132 #define KBD_KEY_SCRLOCK 0x47
133 #define KBD_KEY_PAUSE 0x48
134 #define KBD_KEY_INSERT 0x49
135 #define KBD_KEY_HOME 0x4a
136 #define KBD_KEY_PGUP 0x4b
137 #define KBD_KEY_DEL 0x4c
138 #define KBD_KEY_END 0x4d
139 #define KBD_KEY_PGDOWN 0x4e
140 #define KBD_KEY_RIGHT 0x4f
141 #define KBD_KEY_LEFT 0x50
142 #define KBD_KEY_DOWN 0x51
143 #define KBD_KEY_UP 0x52
144 #define KBD_KEY_PAD_NUMLOCK 0x53
145 #define KBD_KEY_PAD_DIVIDE 0x54
146 #define KBD_KEY_PAD_MULTIPLY 0x55
147 #define KBD_KEY_PAD_MINUS 0x56
148 #define KBD_KEY_PAD_PLUS 0x57
149 #define KBD_KEY_PAD_ENTER 0x58
150 #define KBD_KEY_PAD_1 0x59
151 #define KBD_KEY_PAD_2 0x5a
152 #define KBD_KEY_PAD_3 0x5b
153 #define KBD_KEY_PAD_4 0x5c
154 #define KBD_KEY_PAD_5 0x5d
155 #define KBD_KEY_PAD_6 0x5e
156 #define KBD_KEY_PAD_7 0x5f
157 #define KBD_KEY_PAD_8 0x60
158 #define KBD_KEY_PAD_9 0x61
159 #define KBD_KEY_PAD_0 0x62
160 #define KBD_KEY_PAD_PERIOD 0x63
161 #define KBD_KEY_S3 0x65
170 #define KBD_REGION_JP 1
171 #define KBD_REGION_US 2
182 #define KBD_QUEUE_SIZE 16
void kbd_set_queue(int active) __attribute__((deprecated))
Activate or deactivate global key queueing.
kbd_cond_t cond
The lastest raw condition of the keyboard.
Definition: keyboard.h:217
int kbd_get_key() __attribute__((deprecated))
Pop a key off the global keyboard queue.
One maple device.
Definition: maple.h:237
struct kbd_keymap kbd_keymap_t
Keyboard keymap.
Maple Bus driver interface.
int shift_keys
Modifier key status.
Definition: keyboard.h:230
uint8 matrix[256]
Key array.
Definition: keyboard.h:227
uint8 modifiers
Bitmask of set modifiers.
Definition: keyboard.h:203
Keyboard raw condition structure.
Definition: keyboard.h:202
int queue_head
Key queue head.
Definition: keyboard.h:240
#define KBD_QUEUE_SIZE
Size of a keyboard queue.
Definition: keyboard.h:182
uint32 key_queue[KBD_QUEUE_SIZE]
Individual keyboard queue. You should not access this variable directly. Please use the appropriate f...
Definition: keyboard.h:238
unsigned long uint32
32-bit unsigned integer
Definition: types.h:28
Keyboard keymap.
Definition: keyboard.h:191
struct kbd_state kbd_state_t
Keyboard status structure.
uint8 shifted[256]
Definition: keyboard.h:193
int queue_tail
Key queue tail.
Definition: keyboard.h:239
int kbd_queue_pop(maple_device_t *dev, int xlat)
Pop a key off a specific keyboard's queue.
int queue_len
Current length of queue.
Definition: keyboard.h:241
unsigned char uint8
8-bit unsigned integer
Definition: types.h:30
int region
Keyboard type/region.
Definition: keyboard.h:233
Keyboard status structure.
Definition: keyboard.h:215
uint8 leds
Bitmask of set LEDs.
Definition: keyboard.h:204
uint8 base[256]
Definition: keyboard.h:192