[python-win32] Catching cursor keystrokes using something like msvcrt.getch() or msvcrt.getwch()
Jacob Kruger
jacobk at mailzone.co.za
Fri Jul 1 14:38:35 CEST 2011
Off-hand, while those 2 functions seem to work with other keystrokes, I'm just wondering how, in a command line interface, I could capture things like cursor keystrokes, and, would also be nice if there was a simple way to do it that would work more cross platform, as opposed to only working on windows as such?
If I use either of them, it seems to return a string value that when ord() it, it comes back as 224 for, for example, the up arrow keystroke - but when you then map that to a character using chr(), it returns as the letter h, and this is the same value for all four cursor/arrow keystrokes.
TIA
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
More information about the python-win32
mailing list