-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathKey.hpp
46 lines (43 loc) · 837 Bytes
/
Key.hpp
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
#pragma once
template<class ClassName>
class Key
{
public:
ClassName instance;
void openHandle() {
instance.openHandle();
}
void closeHandle() {
instance.closeHandle();
}
void upAllKey() {
instance.upAllKey();
}
int getKeyState(int keyCode) {
return instance.getKeyState(keyCode);
}
void keyDown(int keyCode) {
instance.keyDown(keyCode);
}
void keyUp(int keyCode) {
instance.keyUp(keyCode);
}
void doKeyPress(int keyCode, int s = 100) {
instance.doKeyPress(keyCode, s);
}
void mouseClick() {
instance.mouseClick();
}
void mouseDoubleClick(int s = 100) {
instance.mouseDoubleClick(s);
}
void moveMousePos(int x, int y) {
instance.moveMousePos(x, y);
}
void setMousePos(int x, int y) {
instance.setMousePos(x, y);
}
void getMousePos(int * x, int * y) {
instance.getMousePos(x, y);
}
};