1
I’m creating a bot to press the "A" key inside a game.
Code I am using:
from pynput.keyboard import Controller;
from time import sleep;
keyboard = Controller();
sleep(2)
keyboard.press("a");
keyboard.release("a");
In the notepad the script works well, press the key smoothly.
However, inside the game does not work. It does not simulate the desired key.
I did some research and apparently it has to do with the focus of the system. How do I solve?
Script/Bot does not break game rules?
– Jean Barbosa