Yes, disable_onkey_defaults() should only be called once. I also believe I see the value of this architecture. I think that we need an array of arrays allowing for several different key mapping "sets". For example:

//Pseudocode

#define MAIN_MENU, 0
#define OPTIONS_MENU,1

//individual key sets
var arKeySetMainMenu[88];
var arKeySetOptionsMenu[88];

//all key sets
var arKeySets[2][88];

arKeySets[MAIN_MENU][KB_A]=arKeySetMainMenu[KB_A];
arKeySets[MAIN_MENU][KB_B]=arKeySetMainMenu[KB_B];

arKeySets[OPTIONS_MENU][KB_A]=arKeySetOptionsMenu[KB_A];
arKeySets[OPTIONS_MENU][KB_B]=arKeySetOptionsMenu[KB_B];

Of course we'd write a function to assign the arrays to this multidimensional array.
Or we could simply forgo extra arrays and shove stuff directly into the multidimensional array.


Chaos is a paradox consistently inconsistent.