Skip to content

Human-like keyboard.dll#72

Open
0nlyDev wants to merge 2 commits intoOpenHoldem:oh_pre_release_v15from
0nlyDev:human-like-keyboarddll
Open

Human-like keyboard.dll#72
0nlyDev wants to merge 2 commits intoOpenHoldem:oh_pre_release_v15from
0nlyDev:human-like-keyboarddll

Conversation

@0nlyDev
Copy link
Copy Markdown

@0nlyDev 0nlyDev commented Mar 30, 2025

Refactor keyboarddll.cpp to simulate human-like typing and add configurable settings

  • Got rid of a very un-human like code that was sending, ctrl, shift, alt in the same order every time the bot typed something (this was an attempt to force unstuck modifier keys.)
  • Removed the mouse click simulation from SendKey (keyboard input is now purely keyboard events - I really don't know why this was left inside the keyboard.dll, seemed unnecessary?).
  • Added human-like typing features:
    • Variable inter-key delays (randomized between InterKeyDelayMin and InterKeyDelayMax).
    • Variable key press durations (randomized between KeyPressDurationMin and KeyPressDurationMax).
    • Additional delay is computed based on the Euclidean distance between consecutive keys on the QWERTY grid, scaled by FingerMovementDelayFactor.
  • Implemented error simulation:
    • With ErrorSimulationProbability, a wrong key is typed that is selected from keys whose Euclidean distance from the intended key is within the ErrorCandidateThreshold.
    • Error correction is simulated by sending a deletion key (configurable via DeletionKey: 0 for Backspace, 1 for Delete) with an extra delay.
  • Integrated configuration support: all timing and error simulation parameters are now read from "keyboard.cfg" from the same directory where the "keyboard.dll" lives.
    If the "keyboard.cfg is missing, the default from the KeyboardConfig struct will be used.").

This commit transitions from the original version of keyboarddll.cpp (which simply simulated key events with fixed delays and mouse click support)
to a more sophisticated, configurable DLL that mimics human typing behavior.

0nlyDev added 2 commits March 30, 2025 05:21
…urable settings

- Got rid of a very un-human like code that was sending, ctrl, shift, alt in the same order every time the bot typed something (this was an attempt to force unstuck modifier keys.)
- Removed the mouse click simulation from SendKey (keyboard input is now purely keyboard events - I really don't know why this was left inside the keyboard.dll, seemed unnecessary?).
- Added human-like typing features:
    * Variable inter-key delays (randomized between InterKeyDelayMin and InterKeyDelayMax).
    * Variable key press durations (randomized between KeyPressDurationMin and KeyPressDurationMax).
    * Additional delay is computed based on the Euclidean distance between consecutive keys on the QWERTY grid, scaled by FingerMovementDelayFactor.
- Implemented error simulation:
    * With ErrorSimulationProbability, a wrong key is typed that is selected from keys whose Euclidean distance from the intended key is within the ErrorCandidateThreshold.
    * Error correction is simulated by sending a deletion key (configurable via DeletionKey: 0 for Backspace, 1 for Delete) with an extra delay.
- Integrated configuration support: all timing and error simulation parameters are now read from "keyboard.cfg" from the same directory where the "keyboard.dll" lives.
  If the "keyboard.cfg is missing, the default from the KeyboardConfig struct will be used.").

This commit transitions from the original version of keyboarddll.cpp (which simply simulated key events with fixed delays and mouse click support)
to a more sophisticated, configurable DLL that mimics human typing behavior.
@0nlyDev 0nlyDev changed the title Human like keyboard.dll Human-like keyboard.dll Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant