Input Functions¶
- class autocv.core.input.Input(hwnd: int = -1)[source]¶
Bases:
VisionExtends the Vision class with functionalities for simulating user input.
This class supports human-like mouse movements, clicks, and keyboard key presses. Randomness and delays are incorporated to mimic natural interaction.
- get_last_moved_point() tuple[int, int][source]¶
Returns the last point where the mouse cursor was moved.
- move_mouse(x: int, y: int, *, human_like: bool = True, ghost_mouse: bool = True) None[source]¶
Moves the mouse cursor to the specified (x, y) coordinates.
The movement is relative to the client area of the target window. If human_like is True, the movement will simulate natural motion.
- click_mouse(button: int = 1, *, send_message: bool = False) None[source]¶
Simulates a mouse click at the last moved position.
- press_vk_key(vk_code: int) None[source]¶
Simulates pressing a virtual key.
- Parameters:
vk_code (int) – Virtual-key code to press.
- release_vk_key(vk_code: int) None[source]¶
Simulates releasing a virtual key.
- Parameters:
vk_code (int) – Virtual-key code to release.
- send_vk_key(vk_code: int) None[source]¶
Sends a virtual key by simulating a press and release.
- Parameters:
vk_code (int) – Virtual-key code to send.