I can control the keyboard and mouse normally using PyAutoGUI in other interfaces, but there is no response in the game interface. I've tried several methods, but none of them worked. Please, experts, provide me with a solution.
Currently PyAutoGUI on Windows doesn't work with DirectInput (which many video games use) so it won't be able to send clicks or key presses to many video games. Adding this support is on the PyAutoGUI feature roadmap, but until then you can use PyAutoIT: https://pypi.org/project/PyAutoIt/