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

Re: [pygame] pygame key event capture



Have you looked at the 'unicode' field of the event object for
keystroke events.   It seem rather under-documented, so you will need
to experiment to see if it does what you need.

David


On Sun, 10 Oct 2004 10:41:30 +0200, manatlan <manatlan@gmail.com> wrote:
> 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
> 


-- 
dkeeney@travelbyroad.net
Pitcher's Duel -> pduel.sourceforge.net