text: 
  // Default key and joystick mappings
  
  enum {
      GP2X_UP=0x1,
      GP2X_UP_LEFT=1<<1,
      GP2X_LEFT=1<<2,
      GP2X_DOWN_LEFT=1<<3,
      GP2X_DOWN=1<<4,
      GP2X_DOWN_RIGHT=1<<5,
      GP2X_RIGHT=1<<6,
      GP2X_UP_RIGHT=1<<7,
      GP2X_START=1<<8,
      GP2X_SELECT=1<<9,
      GP2X_L=1<<10,
      GP2X_R=1<<11,
      GP2X_A=1<<12,
      GP2X_B=1<<13,
      GP2X_X=1<<14,
      GP2X_Y=1<<15,
      GP2X_ESCAPE=1<<16
  };
  
  #define RPI_KEY_A       SDL_SCANCODE_LCTRL
  #define RPI_KEY_B       SDL_SCANCODE_SPACE
  #define RPI_KEY_X       SDL_SCANCODE_LALT
  #define RPI_KEY_Y       SDL_SCANCODE_LSHIFT
  #define RPI_KEY_L       SDL_SCANCODE_Z
  #define RPI_KEY_R       SDL_SCANCODE_X
  #define RPI_KEY_START   SDL_SCANCODE_RETURN
  #define RPI_KEY_SELECT  SDL_SCANCODE_TAB
  #define RPI_KEY_LEFT    SDL_SCANCODE_LEFT
  #define RPI_KEY_RIGHT   SDL_SCANCODE_RIGHT
  #define RPI_KEY_UP      SDL_SCANCODE_UP
  #define RPI_KEY_DOWN    SDL_SCANCODE_DOWN
  #define RPI_KEY_QUIT    SDL_SCANCODE_ESCAPE
  #define RPI_KEY_ACCEL   SDL_SCANCODE_BACKSPACE
  
  #define RPI_JOY_A       3
  #define RPI_JOY_B       2
  #define RPI_JOY_X       1
  #define RPI_JOY_Y       0
  #define RPI_JOY_L       4
  #define RPI_JOY_R       6
  #define RPI_JOY_START   9
  #define RPI_JOY_SELECT  8
  #define RPI_JOY_QUIT    5
  #define RPI_JOY_ACCEL   7
  #define RPI_JOY_QLOAD   10
  #define RPI_JOY_QSAVE   11
  
  #define A_1 0
  #define B_1 1
  #define X_1 2
  #define Y_1 3
  #define L_1 4
  #define R_1 5
  #define A_2 6
  #define B_2 7
  #define X_2 8
  #define Y_2 9
  #define L_2 10
  #define R_2 11
  #define START_1 12
  #define SELECT_1 13
  #define START_2 14
  #define SELECT_2 15
  #define UP_1 16
  #define DOWN_1 17
  #define LEFT_1 18
  #define RIGHT_1 19
  #define UP_2 20
  #define DOWN_2 21
  #define LEFT_2 22
  #define RIGHT_2 23
  #define LU_2 24
  #define LD_2 25
  #define RU_2 26
  #define RD_2 27
  
  #define ACCEL 50
  #define QUIT 51
  #define HELP 52
  
  #define QLOAD 55
  #define QSAVE 56
  
  #define SHIFTL 30
  #define SHIFTR 31
  #define CTRLL 32
  #define CTRLR 33
  
  // Axis positions
  #define CENTER  0
  #define LEFT    1
  #define RIGHT   2
  #define UP      1
  #define DOWN    2
  