Message60769
Logged In: YES
user_id=1188172
First of all, don't accuse me of lying. If I wanted to lie
professionally, I would have become politician, not programmer.
I'm German, and using a German keyboard layout which does
have the ü, so it can be perfectly input.
Your problem is that you cannot input characters which don't
directly create keycodes on the keyboard, but must be copied
to the console in some way.
In python-dev, you said that msvcrt.getch() would have to
call _getch() a second time in the case that it returns 0x00
or 0xe0 the first time and/or return a Unicode string.
First, the documentation for _getch() says that this is a
special case for arrow and function keys (such as F1 or
<Up>). These keys don't have a representation in any
character set, as they are control keys, so how would you
represent them as Unicode?
Second: In my console, pressing F7 yields the return values
"\x00" and "A".
When the 0x00/0xe0 read the first time is secretly
swallowed, the user of msvcrt.getch() can't know whether the
user pressed "A" or F7.
That said, the behaviour of getch() is documented and correct.
But how does that all help you with your original problem,
which is that _getch() doesn't help you with Alt+XXXX
sequences or console window Copy-Paste? In my understanding
_getch() only works with characters directly input to the
console. Sorry, but then this is not a Python problem but a
Windows one. |
|
Date |
User |
Action |
Args |
2008-01-20 09:57:57 | admin | link | issue1233785 messages |
2008-01-20 09:57:57 | admin | create | |
|