import time
import keyboard
import pickle
while True:
print("Connected")
while True: #start
if keyboard.is_pressed('F3'):
print("Start")
keyboard.start_recording()
break
while True: #end
if keyboard.is_pressed('F4'):
print("End")
events = keyboard.stop_recording()
profile_file = open("profile.pickle", "wb")
profile = (events)
pickle.dump(events, profile_file)
profile_file.close()
break
while True: #Play
if keyboard.is_pressed('F5'):
print("Play")
keyboard.replay(events)
print(events)
print("Finish")
break
break
I made a keyboard recording code with Python.
When I print out the recording, it only prints out the key-down key-up.
[KeyboardEvent(f3 up), KeyboardEvent(s down), KeyboardEvent(s up), KeyboardEvent(d down), KeyboardEvent(f down), KeyboardEvent(d up), KeyboardEvent(f up), KeyboardEvent(f4 down)]
All I want is to know the delay between those values. Is that possible?