I'm looking for a way to simulate a key press in an out of focus window.
More specifically, I need to press a key every x seconds in a browser page for a given amount of time. It should look like a simple key press while on the webpage without any input field selected.
I'm currently doing this with a simple AHK script, but I can't use the laptop meanwhile because I need to leave the browser's page in focus.
Do you have any ideas about that? Thank you.
edit: If it can help, there are two options in this webpage that I can select using the keys "0" and "1", and I would like to be able to select one of them while the window is minimized or in background.