I am very new to python, I have been coding in Lua for about 3 years but just the past couple of days I have been learning python, anyways I am trying to make a script that will hold down the “e” key on my keyboard for x seconds. We can say 2 seconds for now. Here is what I have right now.
from pyautogui import* from time import sleep sleep(2) keyDown("e") sleep(2) keyUp("e")
The issue with this is it doesn’t actually hold down the “e” key for 2 seconds it just presses it once. Also for some reason it will only work if I am currently typing something. If I haven’t been clear about something please ask questions like I said I am still very new.