[python-win32] More relating to catching cursor keystrokes in command line
Jacob Kruger
jacobk at mailzone.co.za
Mon Jul 4 09:31:25 CEST 2011
The following seems to actually work relatively consistently after just a bit of testing:
#bit of code sample
while True:
sKey = msvcrt.getwch()
if str(ord(sKey)) == "77":
#end of code sample
And then on this windows7 machine, the following are the strings that seem to match:
72 = up
75 = left
77 = right
80 = down
Anyway, this is just testing, and like you said, would most likely not work too cross platform as such, but anyway.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
More information about the python-win32
mailing list