in reply to Reading all nonblocking keystrokes in Win2000
The Win32PeekChar routine is an XS routine, it interfaces C and Perl. Looking at the module's source it doesn't look like its at all equipped to give a multibyte return value -- so you're screwed. The Win32 API calls used (PeekConsoleInput, ReadConsoleInput, WaitForSingleObject) might provide the raw information to Win32PeekChar but I'm not going to research the Win32 API for someone else's question. I'm not a masochist. :)
It is possible to do this because the Tk module can catch these kinds of events. But Tk is a hefty beast if all you want is to catch keystrokes. Perhaps brush up on your C programming and fix ReadKey.xs to do the Right Thing.
|
|---|