Human-like keyboard.dll#72
Open
0nlyDev wants to merge 2 commits intoOpenHoldem:oh_pre_release_v15from
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor keyboarddll.cpp to simulate human-like typing and add configurable settings
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.