You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Changelog
Key State Management Refactor
Before: Managed key states using individual global variables (wWasPressed, aWasPressed, dWasPressed).
Latest: Replaced the individual variables with a Map() object (KeyStates) to dynamically store and handle the states of multiple keys, improving maintainability and reducing redundancy.
Loop Optimization for Key Release and Re-press
Before: Released and re-pressed keys using separate if statements for each key.
Latest: Utilized loops to iterate over the relevant keys (w, a, d), making the code more concise and easier to extend if additional keys need to be managed in the future.
Arrow Function for High-Precision Sleep
Before: Used a standard function definition for HighPrecisionSleep.
Latest: Simplified the function with AutoHotkey v2’s arrow function syntax, enhancing readability.
Global Keyword Usage
Before: Explicitly declared individual global variables for each key state.
Latest: Declared the KeyStates map as global, reducing the number of global variables and simplifying the code structure.