-
Notifications
You must be signed in to change notification settings - Fork 2
/
AltKeyboardMovement.ash
95 lines (61 loc) · 1.9 KB
/
AltKeyboardMovement.ash
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
// new module header
enum eKMKey {
eKMKeyUp,
eKMKeyLeft,
eKMKeyRight,
eKMKeyDown,
eKMKeyRun
};
enum eKMModificatorKeyCode {
eKMModKeyLeftShift = 403,
eKMModKeyRightShift = 404,
eKMModKeyLeftCtrl = 405,
eKMModKeyRightCtrl = 406,
eKMModKeyAlt = 407
};
enum eKMMovementKeys {
eKMMovementWASD,
eKMMovementArrowKeys
};
struct str_keys {
eKeyCode Up, Left, Down, Right;
eKMModificatorKeyCode Run;
};
enum eKMLoopDomination {
eKMLoopDHorizontal,
eKMLoopDVertical,
eKMLoopDLast
};
enum eKMMode {
eKeyboardMovement_Tapping, // old module contingency
eKMModePressing
};
struct KeyboardMovement {
// keys
import static eKeyCode GetKey(eKMKey key);
import static void SetKey(eKMKey key, eKeyCode k);
import static void SetRunKey(eKMModificatorKeyCode k = eKMModKeyLeftShift);
import static void SetMovementKeys(eKMMovementKeys mk = eKMMovementWASD);
// settings
import static int GetRunSpeed();
import static void SetRunSpeed(int RunSpeed = 2);
import static void SetLoopDomination(eKMLoopDomination LoopDomination = eKMLoopDLast);
import static int GetRunView();
import static void SetRunView(int RunView, int RunSpeedX, int RunSpeedY);
import static void SetDiagonalFactor(float DiagonalFactor);
import static void SetEdgeAnimation(bool AnimateAtEdge);
import static void SetBlockedTurn(bool TurnIfBlocked);
import static void SetIdleView(int view, int delay);
// status
import static bool Moving();
import static bool Animating();
// control
import static eKMMode GetMode();
import static void SetMode(eKMMode Mode = eKMModePressing);
import static void Enable();
import static void Disable();
import static bool IsEnabled();
import static void StopMoving();
//fake keys
import static void FakeKeyPres(eKeyCode k);
};