Need some input help

I’m trying to make a program that lets the user change the controls for the game, how would you suggest doing this?

For this you need some sort of lookup table that maps between SDL key codes and
internal command codes (integers). You create a bunch of internal command
codes, something like this:

CMD_UP = 0;
CMD_DOWN = 1;
CMD_LEFT = 2;
CMD_RIGHT = 3;
CMD_JUMP = 4;
CMD_RUN = 5;

and so on. Write your game logic so that the game will respond to each command
code appropriately. Then write your input code so it looks at the keys it
receives, checks the lookup table to see if each key has an associated command
code, and if so, sends that command code to the game engine.

Then you write a module that lets the user change the key mappings, and have
that update the lookup table. And be sure you save the lookup table somewhere
and reload it when you launch the program.________________________________
From: cndr.backup@yahoo.com (cndr.mike)
To: sdl at lists.libsdl.org
Sent: Fri, October 29, 2010 4:06:21 PM
Subject: [SDL] need some input help

I’m trying to make a program that lets the user change the controls for the
game, how would you suggest doing this?

thanks for the help, didn’t know that they were ints, have it working now.