as I am copying my work I figured I'd document all the things you have to do to get a new key controle in game
so, you have a new key controle that you want to have bindable
first thing you have to do is add a define for it in controlsconfig.h there is a long list of them ending around line 444, in the origonal code there is 106 keys defined, in the SCP version there is going to be about 111 (after I put in my stuff)
you must add to this list like this
#define TOGGLE_HUD 107
that's RT's hud togleing thing for exterior veiw
at the botom of the list is this
#define CCFG_MAX "enter number + 1 of last key define here"
then you need to set up were it is to be found in the controles config, and it's default binding in a table called config_item Control_config ( ControlsConfigCommon.cpp )
seeing as I used it once allready here is RT's entry into this table
{ KEY_SHIFTED | KEY_O, -1, COMPUTER_TAB, "Toggle HUD"},
(KEY_O) this sets the default binding to the o key, (KEY_SHIFTED ) further it requires the shift key to be down, the -1 is an index to the joystick button, (COMPUTER_TAB) it is in the targeting panel, and has the description "Toggle HUD". if you look at other entrys you will also see that you can have alt key things.
this table is in order of the defines in controlsconfig.h if you add something to there you must add an entry to the botom of this list. [edit]also if you are going to use the time down check functions you must tack on ", CC_TYPE_CONTINUOUS" after the description[/edit]
there, now you have the new controle setup, now you just need to use it, most likely you will want to use check_control_timef(), it will return how long the controle has been in use, or just the fact that it has been in use.
another good one is check_control(), wich will mearly tell you if the controle is active
if you just want to quickly hack in a controle you may use key_down_timef() as a replacement, were you just have to put in a hard coded non-changeable key binding (for example KEY_D)
almost all key conrole stuff is found in PlayerControl.cpp
also adding a new bindable key will require you make a new pilot, make sure to tell anyone about this up front