pedrolemoz

Untitled

Jul 1st, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. from msvcrt import getch
  2. while True:
  3. key = ord(getch())
  4. if key == 27: #ESC
  5. break
  6. elif key == 13: #Enter
  7. select()
  8. elif key == 224: #Special keys (arrows, f keys, ins, del, etc.)
  9. key = ord(getch())
  10. if key == 80: #Down arrow
  11. moveDown()
  12. elif key == 72: #Up arrow
  13. moveUp()
Add Comment
Please, Sign In to add comment