2

I get key code from KeyPressed event and I need somehow to generate a character from that key code. For example, user pressed 'A', I catch that event, get keycode and then I want to get back 'A' from keycode and write it somewhere. Is that possible?

4

1 回答 1

1

您可能想看看 Python 文档:http ://docs.python.org/2/library/functions.html#chr

无论如何,这就是您要查找的内容(假设您需要的是 ASCII 码):

keycode = 65
char = chr(keycode)
print char
于 2013-07-13T19:16:50.410 回答