i use pyautogui to simulate something in a game -> it uses my keybinds eg w a s d, mouse clicking etc
the problem is that i need to keep my focus on the game. i cant minimize the game and do something else with my laptop as it is still using my keyboard.
eg i run it, i try to change to youtube -> will try typing w w d as all the time because the script thinks i am in my game.
i need a way to create two "instances of keyboards" where one only runs in my game and my other one is my normal keyboard