Simulate a key press for a window
Hello , can someone help me to find a function that can simulate a key press for a window ? For exemple , if I want to simulate the keyboard letter "X" I have to stay in the window to make it work , but I was wondering how to make it so it will simulate the key "X" for a window even if im not on it ? So I can watch a youtube video , and the program still spamming the letter 'X' in my notepad ! Thank you for help !

