[Tutor] key detection

Steven D'Aprano steve at pearwood.info
Wed May 6 03:32:45 CEST 2015


On Tue, May 05, 2015 at 02:30:41PM -0700, Jim Mooney Py3.4.3winXP wrote:
> Can python detect a keypress? I've looked all over and can't find it. I
> don't mean input('blah') and have to press Enter - just detect it directly
> like Javascript does. All I find are references using msvcrt, which is
> Msoft specific, or using tkinter - but I don't want a whacking big GUI,
> just keypress detection. Can I make a simple keyboard event loop without
> tkinter?

https://code.activestate.com/recipes/577977-get-single-keypress/


-- 
Steve


More information about the Tutor mailing list