aboutsummaryrefslogtreecommitdiff
path: root/src/common/include/proto/keyboard.h
blob: c7a2ef895b375158ff3187bea938091146f0c7ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#pragma once

#include <stdint.h>
#include <stddef.h>

typedef struct {
	uint16_t scancode;
	uint16_t type;
} kbd_event_t;

#define KBD_EVENT_KEYRELEASE 0
#define KBD_EVENT_KEYPRESS 1

#define IOCTL_KBD_SET_LEDS 10

#define KBD_LED_SCROLLLOCK 	1
#define KBD_LED_NUMLOCK  	2
#define KBD_LED_CAPSLOCK 	4

#define KBD_CODE_ESC 		1
#define KBD_CODE_RETURN		28
#define KBD_CODE_BKSP		14
#define KBD_CODE_UP			200
#define KBD_CODE_DOWN		208
#define KBD_CODE_LEFT		203
#define KBD_CODE_RIGHT		205
#define KBD_CODE_HOME		199
#define KBD_CODE_END		207
#define KBD_CODE_PGUP		201
#define KBD_CODE_PGDOWN		209

#define KBD_CODE_LSHIFT		42
#define KBD_CODE_RSHIFT		54
#define KBD_CODE_CAPSLOCK	58
#define KBD_CODE_LCTRL		29
#define KBD_CODE_RCTRL		157
#define KBD_CODE_LALT		56
#define KBD_CODE_RALT		184
#define KBD_CODE_LSUPER		219
#define KBD_CODE_RSUPER		220
#define KBD_CODE_MENU		221
#define KBD_CODE_TAB		15
#define KBD_CODE_INS		210
#define KBD_CODE_DEL		211

#define KBD_CODE_F1			59
#define KBD_CODE_F2			60
#define KBD_CODE_F3			61
#define KBD_CODE_F4			62
#define KBD_CODE_F5			63
#define KBD_CODE_F6			64
#define KBD_CODE_F7			65
#define KBD_CODE_F8			66
#define KBD_CODE_F9			67
#define KBD_CODE_F10		68
#define KBD_CODE_F11		87
#define KBD_CODE_F12		88

#define KBD_CODE_NUMLOCK	69
#define KBD_CODE_SCRLLOCK	70
#define KBD_CODE_PRTSCN		183
#define KBD_CODE_SYSREQ		84

#define KBD_CODE_KPHOME		71
#define KBD_CODE_KPUP		72
#define KBD_CODE_KPPGUP		73
#define KBD_CODE_KPLEFT		75
#define KBD_CODE_KP5		76
#define KBD_CODE_KPRIGHT	77
#define KBD_CODE_KPEND		79
#define KBD_CODE_KPDOWN		80
#define KBD_CODE_KPPGDOWN	81
#define KBD_CODE_KPINS		82
#define KBD_CODE_KPDEL		83

/* vim: set ts=4 sw=4 tw=0 noet :*/