Pandora How To Map Pandora Controls With Python ?


Magic Sam

Forever Homebrew
Joined
Aug 10, 2007
Messages
2,542
Age
41
Location
Yuzu onsen
Hi,

Do you know how to map Pandora's specific controls with Python ?

What are the correct key codes for start/alt, select/control, Pandora and AYBX buttons ?

Bye and thanks, Magic Sam
 
http://www.gp32x.de/board/index.php?/topic/54532-pandora-control-mappings/

(I'm guessing you're using pygame)
 
Last edited by a moderator:
Thanks sebt3 :)

Here is how the imput code looks like now:

Code:
#translation tables
translations_default = {
    KEYDOWN: {
        K_UP: UP,
        K_DOWN: DOWN,
        K_LEFT: LEFT,
        K_RIGHT: RIGHT,
        K_RETURN: PRESS,
	SDLK_END: PRESS, # B button on Pandora
       #K_SPACE: PRESS,
        K_KP8: UP,
        K_KP2: DOWN,
        K_KP4: LEFT,
        K_KP6: RIGHT,
        K_KP5: DOWN,
	SDLK_ALT: ABORT, # Start button on Pandora
       #K_ESCAPE: ABORT,
        K_DELETE: ABORT,
        K_BREAK: ABORT,
        #vi keys
        K_h: LEFT,
        K_j: DOWN,
        K_k: UP,
        K_l: RIGHT,
    },
When I start the game I have the following error message:

<type 'exceptions.NameError'>:
name 'SDLK_END' is not defined
What am I doing wrong ?

Bye and thanks for your help, Magic Sam
 
And if not using SDL/pygame or the like, you could hit /dev/evdev or other interfaces yourself. libpnd includes a nice simple little API for working with evdev as well, and I think pndstore already exposes a wrapped pythonic version of libpnd so might get you access to the libpnd API without any work yourself.

jeff
 
Back
Top