-
Notifications
You must be signed in to change notification settings - Fork 27
/
input.go
125 lines (121 loc) · 2.85 KB
/
input.go
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Copyright 2014-2016 Joseph Hager. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package engi
type Action int
type Key int
type Modifier int
var (
MOVE = Action(0)
PRESS = Action(1)
RELEASE = Action(2)
REPEAT = Action(3)
SHIFT = Modifier(0x0001)
CONTROL = Modifier(0x0002)
ALT = Modifier(0x0004)
SUPER = Modifier(0x0008)
)
var (
Dash = Key(189)
Apostrophe = Key(222)
Semicolon = Key(186)
Equals = Key(187)
Comma = Key(188)
Period = Key(190)
Slash = Key(191)
Backslash = Key(220)
Backspace = Key(8)
Tab = Key(9)
CapsLock = Key(20)
Space = Key(32)
Enter = Key(13)
Escape = Key(27)
Insert = Key(45)
PrintScreen = Key(42)
Delete = Key(46)
PageUp = Key(33)
PageDown = Key(34)
Home = Key(36)
End = Key(35)
Pause = Key(19)
ScrollLock = Key(145)
ArrowLeft = Key(37)
ArrowRight = Key(39)
ArrowDown = Key(40)
ArrowUp = Key(38)
LeftBracket = Key(219)
LeftShift = Key(16)
LeftControl = Key(17)
LeftSuper = Key(73)
LeftAlt = Key(18)
RightBracket = Key(221)
RightShift = Key(16)
RightControl = Key(17)
RightSuper = Key(73)
RightAlt = Key(18)
Zero = Key(48)
One = Key(49)
Two = Key(50)
Three = Key(51)
Four = Key(52)
Five = Key(53)
Six = Key(54)
Seven = Key(55)
Eight = Key(56)
Nine = Key(57)
F1 = Key(112)
F2 = Key(113)
F3 = Key(114)
F4 = Key(115)
F5 = Key(116)
F6 = Key(117)
F7 = Key(118)
F8 = Key(119)
F9 = Key(120)
F10 = Key(121)
F11 = Key(122)
F12 = Key(123)
A = Key(65)
B = Key(66)
C = Key(67)
D = Key(68)
E = Key(69)
F = Key(70)
G = Key(71)
H = Key(72)
I = Key(73)
J = Key(74)
K = Key(75)
L = Key(76)
M = Key(77)
N = Key(78)
O = Key(79)
P = Key(80)
Q = Key(81)
R = Key(82)
S = Key(83)
T = Key(84)
U = Key(85)
V = Key(86)
W = Key(87)
X = Key(88)
Y = Key(89)
Z = Key(90)
NumLock = Key(144)
NumMultiply = Key(106)
NumDivide = Key(111)
NumAdd = Key(107)
NumSubtract = Key(109)
NumZero = Key(96)
NumOne = Key(97)
NumTwo = Key(98)
NumThree = Key(99)
NumFour = Key(100)
NumFive = Key(101)
NumSix = Key(102)
NumSeven = Key(103)
NumEight = Key(104)
NumNine = Key(105)
NumDecimal = Key(110)
NumEnter = Key(13)
)