[sugar] Game key events

Julius B. Lucks julius at younglucks.com
Tue Jul 3 20:57:00 EDT 2007


If you use pygame, make sure you get the latest olpcgames code from  
lincoln quirk (lincolnquirk on irc) that adds the bindings for the  
game keys.  To use them in pygame, they are

         'KP_Page_Up' : pygame.K_KP9,
         'KP_Page_Down' : pygame.K_KP3,
         'KP_End' : pygame.K_KP1,
         'KP_Home' : pygame.K_KP7,
         'KP_Up': pygame.K_KP8,
         'KP_Down': pygame.K_KP2,
         'KP_Left': pygame.K_KP4,
         'KP_Right': pygame.K_KP6

These are from canvas.py within the olpcgames code.  I believe the  
keys on the right side of the monitor are up/down/left/right, and on  
the left are page_up/page_dn/home/end .

Cheers,

Julius

------------------------------------------------------------------------ 
---------------
Please Reply to My Permanent Address: julius at younglucks.com
http://www.openwetware.org/wiki/User:Julius_B._Lucks
------------------------------------------------------------------------ 
----------------



On Jul 3, 2007, at 7:31 PM, Erik Blankinship wrote:

> What should activities connect to to receive game key presses (e.g.
> the playstation buttons)?
>
>
> _______________________________________________
> Sugar mailing list
> Sugar at lists.laptop.org
> http://lists.laptop.org/listinfo/sugar

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/sugar/attachments/20070703/47afbeb4/attachment.htm 


More information about the Sugar mailing list