Skip to content

Instantly share code, notes, and snippets.

@lidorshimoni
Created April 26, 2025 15:54
Show Gist options
  • Save lidorshimoni/92d79788447deb9841ca3645d361c9c3 to your computer and use it in GitHub Desktop.
Save lidorshimoni/92d79788447deb9841ca3645d361c9c3 to your computer and use it in GitHub Desktop.
from pynput.keyboard import Key, Controller
import time
keyboard = Controller()
while True:
text = input("text:")
time.sleep(1)
for char in text:
keyboard.press(char)
keyboard.release(char)
#if char is ' ':
# keyboard.press('a')
# keyboard.release('a')
# for i in range(5):
# keyboard.press(Key.backspace)
# keyboard.release(Key.backspace)
time.sleep(0.04)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment