Guest User

Untitled

a guest
Jun 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. from pynput import keyboard
  2.  
  3. def keyPress(key):
  4. if key == keyboard.Key.up:
  5. print('Up pressed')
  6.  
  7. with keyboard.Listener(
  8. on_press=keyPress) as kb:
  9. kb.join()
  10.  
  11. pip install pynput
  12.  
  13. #include<stdio.h>
  14. #include<conio.h>
  15.  
  16. int main() {
  17. while (1) {
  18. printf("%c", getch());
  19. }
  20. return 0;
  21. }
  22.  
  23. import msvcrt
  24. while True:
  25. print(msvcrt.getch().decode('utf-8'))
Add Comment
Please, Sign In to add comment