I've tried to do this as many ways as I can. I figured out how to use the code I posted originally. It doesn't show any errors but it simply doesn't work. Oh and I want this to simulate me holding down a key on my keyboard. So I want any application on my computer to be able to think that I'm constantly holding that key.