0

Thank you for reading this.

So e.g I start csgo, minecraft, or whatever game. When I'm in game I want to open the chat by pressing the key "y", nevertheless, I've tried using pyautogui, keyboard, win32api and win32con, they only simulate virtual key presses and I guess that's the problem since the games don't accept it as real key presses. Is there any way I could simulate it as actual key presses?

I appreciate any answer! Have a good day :)

  • All the tools you mention do what they do by sending Windows messages. But, as you have figured out, games typically take charge of the keyboard at hardware or driver level, for performance. So keypresses grabbed by the game never reach Windows, and the game pays no attention to keyboard messages at the Windows level. I know of no way to do what you want in Python, and I doubt if there is one. – BoarGules Jun 10 '22 at 17:14

1 Answers1

0

I don't think Python is the right tool for this, try looking for key mappers (like KeyMapper), they simulate keypresses better afaik and you can easily bound 'y' to press whatever button opens chat in the game you want.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 11 '22 at 06:17