Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.
import msvcrt def doKeyEvent(key): if key == '\x00' or key == '\xe0': # non ASCII key = msvcrt.getch() print (ord(key),) def doQuitEvent(key): raise SystemExit def keyTest1() : ky = msvcrt.getch() length = len(ky) if length != 0: if ky == " ": doQuitEvent(ky) else: doKeyEvent(ky)
Join the community of 500,000 technology professionals and ask your questions.