Subject: | Problem with key <enter> on windows |
Hi,
I tried this module on unix/windows. I found no problem on Linux.
On windows (on classic cmd) I tryed using stty command (get in
coreutils-6.9) with some modifications in the module to match the
installation path and I tryed using the raw Mode given by "ReadMode 4"
(Term::ReadKey) ...
Nevertheless, I still have some problems in the reading of the ENTER
key. Indeed I have to press either 4 Times ENTER to have it accepted or
ENTER followed by another different key.
I found the following point on the Web. It seems to be still the issue :
=========================================================
Ilya found a bug in PerlIO, then found another bug while attempting to
demonstrate it. The original bug was:
The *actual* problem is that char-by-char input requires DUPLICATE
pressing of ENTER key for this key to be seen by Perl. Debugging this
problem (via Term::ReadKey test suite) shows the following logic:
pp_getc() calls is_eof() which does getc/ungetc calls getc()
[BTW, I see no logic in this sequence of events.]
The problem is that ungetc() can't unget "\n" if this \n is the
first char in the buffer, and quietly drops "\n" to the floor.
=========================================================
Regards,
Frederic Roudaut