-
Notifications
You must be signed in to change notification settings - Fork 0
/
KeyCodes.cs
248 lines (237 loc) · 9.35 KB
/
KeyCodes.cs
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
using System;
namespace PlayNextSong
{
public class KeyCodes
{
public static uint R_KEY = 0x52;
public static uint G_key = 0x47;
public static uint J_key = 0x4A;
public static uint K_key = 0x4B;
public static uint F_key = 0x46;
public static uint W_key = 0x57;
public static uint E_key = 0x45;
public static uint Tilde_key = 0xC0;
public static uint VK_LBUTTON = 0x01;
public static uint VK_RBUTTON = 0x02;
public static uint VK_CANCEL = 0x03;
public static uint VK_MBUTTON = 0x04;
public static uint VK_XBUTTON1 = 0x05;
public static uint VK_XBUTTON2 = 0x06;
public static uint VK_BACK = 0x08;
public static uint VK_TAB = 0x09;
public static uint VK_CLEAR = 0x0C;
public static uint VK_RETURN = 0x0D;
public static uint VK_SHIFT = 0x10;
public static uint VK_CONTROL = 0x11;
public static uint VK_MENU = 0x12;
public static uint VK_PAUSE = 0x13;
public static uint VK_CAPITAL = 0x14;
public static uint VK_KANA = 0x15;
public static uint VK_HANGUEL = 0x15;
public static uint VK_HANGUL = 0x15;
public static uint VK_JUNJA = 0x17;
public static uint VK_FINAL = 0x18;
public static uint VK_HANJA = 0x19;
public static uint VK_KANJI = 0x19;
public static uint VK_ESCAPE = 0x1B;
public static uint VK_CONVERT = 0x1C;
public static uint VK_NONCONVERT = 0x1D;
public static uint VK_ACCEPT = 0x1E;
public static uint VK_MODECHANGE = 0x1F;
public static uint VK_SPACE = 0x20;
public static uint VK_PRIOR = 0x21;
public static uint VK_NEXT = 0x22;
public static uint VK_END = 0x23;
public static uint VK_HOME = 0x24;
public static uint VK_LEFT = 0x25;
public static uint VK_UP = 0x26;
public static uint VK_RIGHT = 0x27;
public static uint VK_DOWN = 0x28;
public static uint VK_SELECT = 0x29;
public static uint VK_PRINT = 0x2A;
public static uint VK_EXECUTE = 0x2B;
public static uint VK_SNAPSHOT = 0x2C;
public static uint VK_INSERT = 0x2D;
public static uint VK_DELETE = 0x2E;
public static uint VK_HELP = 0x2F;
public static uint VK_LWIN = 0x5B;
public static uint VK_RWIN = 0x5C;
public static uint VK_APPS = 0x5D;
public static uint VK_SLEEP = 0x5F;
public static uint VK_NUMPAD0 = 0x60;
public static uint VK_NUMPAD1 = 0x61;
public static uint VK_NUMPAD2 = 0x62;
public static uint VK_NUMPAD3 = 0x63;
public static uint VK_NUMPAD4 = 0x64;
public static uint VK_NUMPAD5 = 0x65;
public static uint VK_NUMPAD6 = 0x66;
public static uint VK_NUMPAD7 = 0x67;
public static uint VK_NUMPAD8 = 0x68;
public static uint VK_NUMPAD9 = 0x69;
public static uint VK_MULTIPLY = 0x6A;
public static uint VK_ADD = 0x6B;
public static uint VK_SEPARATOR = 0x6C;
public static uint VK_SUBTRACT = 0x6D;
public static uint VK_DECIMAL = 0x6E;
public static uint VK_DIVIDE = 0x6F;
public static uint VK_F1 = 0x70;
public static uint VK_F2 = 0x71;
public static uint VK_F3 = 0x72;
public static uint VK_F4 = 0x73;
public static uint VK_F5 = 0x74;
public static uint VK_F6 = 0x75;
public static uint VK_F7 = 0x76;
public static uint VK_F8 = 0x77;
public static uint VK_F9 = 0x78;
public static uint VK_F10 = 0x79;
public static uint VK_F11 = 0x7A;
public static uint VK_F12 = 0x7B;
public static uint VK_F13 = 0x7C;
public static uint VK_F14 = 0x7D;
public static uint VK_F15 = 0x7E;
public static uint VK_F16 = 0x7F;
public static uint VK_F17 = 0x80;
public static uint VK_F18 = 0x81;
public static uint VK_F19 = 0x82;
public static uint VK_F20 = 0x83;
public static uint VK_F21 = 0x84;
public static uint VK_F22 = 0x85;
public static uint VK_F23 = 0x86;
public static uint VK_F24 = 0x87;
public static uint VK_NUMLOCK = 0x90;
public static uint VK_SCROLL = 0x91;
public static uint VK_LSHIFT = 0xA0;
public static uint VK_RSHIFT = 0xA1;
public static uint VK_LCONTROL = 0xA2;
public static uint VK_RCONTROL = 0xA3;
public static uint VK_LMENU = 0xA4;
public static uint VK_RMENU = 0xA5;
public static uint VK_BROWSER_BACK = 0xA6;
public static uint VK_BROWSER_FORWARD = 0xA7;
public static uint VK_BROWSER_REFRESH = 0xA8;
public static uint VK_BROWSER_STOP = 0xA9;
public static uint VK_BROWSER_SEARCH = 0xAA;
public static uint VK_BROWSER_FAVORITES = 0xAB;
public static uint VK_BROWSER_HOME = 0xAC;
public static uint VK_VOLUME_MUTE = 0xAD;
public static uint VK_VOLUME_DOWN = 0xAE;
public static uint VK_VOLUME_UP = 0xAF;
public static uint VK_MEDIA_NEXT_TRACK = 0xB0;
public static uint VK_MEDIA_PREV_TRACK = 0xB1;
public static uint VK_MEDIA_STOP = 0xB2;
public static uint VK_MEDIA_PLAY_PAUSE = 0xB3;
public static uint VK_LAUNCH_MAIL = 0xB4;
public static uint VK_LAUNCH_MEDIA_SELECT = 0xB5;
public static uint VK_LAUNCH_APP1 = 0xB6;
public static uint VK_LAUNCH_APP2 = 0xB7;
public static uint VK_OEM_1 = 0xBA;
public static uint VK_OEM_PLUS = 0xBB;
public static uint VK_OEM_COMMA = 0xBC;
public static uint VK_OEM_MINUS = 0xBD;
public static uint VK_OEM_PERIOD = 0xBE;
public static uint VK_OEM_2 = 0xBF;
public static uint VK_OEM_3 = 0xC0;
public static uint VK_OEM_4 = 0xDB;
public static uint VK_OEM_5 = 0xDC;
public static uint VK_OEM_6 = 0xDD;
public static uint VK_OEM_7 = 0xDE;
public static uint VK_OEM_8 = 0xDF;
public static uint VK_OEM_102 = 0xE2;
public static uint VK_PROCESSKEY = 0xE5;
public static uint VK_PACKET = 0xE7;
public static uint VK_ATTN = 0xF6;
public static uint VK_CRSEL = 0xF7;
public static uint VK_EXSEL = 0xF8;
public static uint VK_EREOF = 0xF9;
public static uint VK_PLAY = 0xFA;
public static uint VK_ZOOM = 0xFB;
public static uint VK_NONAME = 0xFC;
public static uint VK_PA1 = 0xFD;
public static uint VK_OEM_CLEAR = 0xFE;
public static uint Key_0 = 0x30;
public static uint Key_1 = 0x31;
public static uint Key_2 = 0x32;
public static uint Key_3 = 0x33;
public static uint Key_4 = 0x34;
public static uint Key_5 = 0x35;
public static uint Key_6 = 0x36;
public static uint Key_7 = 0x37;
public static uint Key_8 = 0x38;
public static uint Key_9 = 0x39;
public static uint Key_A = 0x41;
public static uint Key_B = 0x42;
public static uint Key_C = 0x43;
public static uint Key_D = 0x44;
public static uint Key_E = 0x45;
public static uint Key_F = 0x46;
public static uint Key_G = 0x47;
public static uint Key_H = 0x48;
public static uint Key_I = 0x49;
public static uint Key_J = 0x4A;
public static uint Key_K = 0x4B;
public static uint Key_L = 0x4C;
public static uint Key_M = 0x4D;
public static uint Key_N = 0x4E;
public static uint Key_O = 0x4F;
public static uint Key_P = 0x50;
public static uint Key_Q = 0x51;
public static uint Key_R = 0x52;
public static uint Key_S = 0x53;
public static uint Key_T = 0x54;
public static uint Key_U = 0x55;
public static uint Key_V = 0x56;
public static uint Key_W = 0x57;
public static uint Key_X = 0x58;
public static uint Key_Y = 0x59;
public static uint Key_Z = 0x5A;
}
public enum KeyboardModifierKeys : uint
{
MOD_SHIFT = 0x0004,
MOD_CTRL = 0x0002,
MOD_ALT = 0x0001,
MOD_NONE = 0x0000,
}
public enum MouseEvents
{
MOUSEEVENTF_LEFTDOWN = 0x02,
MOUSEEVENTF_LEFTUP = 0x04,
MOUSEEVENTF_RIGHTDOWN = 0x08,
MOUSEEVENTF_RIGHTUP = 0x10,
WHEEL_DELTA = 120,
WHEEL_DELTA_MINUS = -120,
MOUSEEVENTF_WHEEL = 0x0800,
}
public static class HookType
{
public static int WH_JOURNALRECORD = 0;
public static int WH_JOURNALPLAYBACK = 1;
public static int WH_KEYBOARD = 2;
public static int WH_GETMESSAGE = 3;
public static int WH_CALLWNDPROC = 4;
public static int WH_CBT = 5;
public static int WH_SYSMSGFILTER = 6;
public static int WH_MOUSE = 7;
public static int WH_HARDWARE = 8;
public static int WH_DEBUG = 9;
public static int WH_SHELL = 10;
public static int WH_FOREGROUNDIDLE = 11;
public static int WH_CALLWNDPROCRET = 12;
public static int WH_KEYBOARD_LL = 13;
public static int WH_MOUSE_LL = 14;
}
[Flags]
public enum KBDLLHOOKSTRUCTFlags : uint
{
LLKHF_EXTENDED = 0x01,
LLKHF_INJECTED = 0x10,
LLKHF_ALTDOWN = 0x20,
LLKHF_UP = 0x80,
}
public enum WindowStateFlags
{
SW_SHOW = 5,
SW_MINIMIZE = 6,
SW_RESTORE = 9,
}
}