User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030603 Thunderbird/0.1a
Gerrit Holl wrote:
Hmm, I didn't know .unicode but it seems it is only defined if it is a
character: so for arrows, function keys, etc., it seems not to be defined.
IMHO it seems to be defined with value of u'' so things like isalpha()
still works
my testing script:
import sys
import pygame
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((468, 60))
while 1:
for e in pygame.event.get():
if e.type == KEYDOWN:
print e.unicode, repr(e.unicode), e.unicode.isalpha()
elif e.type == QUIT:
sys.exit()