Skip to content

v1.0.1

Choose a tag to compare

@yxnc yxnc released this 31 Aug 02:13
· 8 commits to main since this release
299f284

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.