[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] pygame key event capture



hi ...

i've got a remote, which is an extension of the keyboard under my linux box.
i want to make a frontend with pygame, to drive my music.
i'd like to capture events from my remote ...
but it seems it's not possible ...

when i do :

e = pygame.event.wait()

if e.type == KEYDOWN:
    print "a key from my remote is pressed"

a keydown event is catched, but it's not possible to get the keycode
with "pygame.key.get_pressed()" ... because most of the keycodes are
greater than 300 ... and it seems that get_pressed return a limited
range of keycodes, so it can't return this "extended keycodes" ...

is there a way to catch the real keycode of the pressed key ?

thanx a lot for all your answers
i'd like, a lot, to make my frontend with pygame ... pleae help me