so everything works fine without the os.system("Notepad") but when I add that it waits for me to close the application. But instead I wan't it to press the keys inside the notepad application. Any solutions?
import os
import keyboard
import time
list = [27, 1, 4, 21, 12, 20, 0, 19, 23, 9, 13, 29]
word = ""
for i in list:
char = chr(ord('`') + i)
if i == 27:
word = word + "["
elif i == 29:
word = word + "]"
elif i == 0:
word = word + " "
else:
word = word + char
def split(word):
return [char for char in word]
words = split(word)
os.system("Notepad")
for i in words:
keyboard.press(i)
time.sleep(.2)