[Python] Simulate Mouse and Keyboard Input in VMware VM (Game Not Detecting Inputs)

Discussão em 'Python' iniciado por Stack, Dezembro 18, 2024.

  1. Stack

    Stack Membro Participativo

    I have a VMware virtual machine running a game, and I need to programmatically simulate mouse clicks and keyboard inputs inside the VM, even when the VM is running in the background.

    PyAutoGUI, PyDirectInput, PyAutoIt, Win32 API: These tools can move the mouse and send inputs outside the game window (inside the VM), but the game does not detect them. On my host machine, PyAutoIt works perfectly (clicks and movements are detected by the game).

    Inputs (mouse/keyboard) simulate correctly for normal OS-level actions (like clicking buttons), but the game does not detect them. This issue only occurs inside the VM.

    Is there a way to emulate a virtual USB mouse/keyboard inside the VMware VM? Are there alternative tools or methods to send inputs to a game running in a VM?

    Continue reading...

Compartilhe esta Página