What I hear you saying is, an alternative would be ot drop the use of the existing on_* handlers and create my own... because, you cannot save on_* in an array element in such a way as to allow changing what it is pointed an array element? The is a hack example of what I was intending to do:

function myfunction();

handler_store[1] = &on_a; // save location of on_a(?)
...
**handler_store[1] = myfunction; // indirectly change what on_a points to (?)

ALTERNATIVELY...

function key_event_one();
function key_event_two();
function handle_key(var scancode);
...
void* events[...];
...
// Initialize event handler array; index associated with scan code...
event[1] = key_event_one;
event[2] = key_event_two;

// Set on_anykey to generic handler function...
on_anykey = handle_key;

function handle_key(var scancode)
{
// Get handler from array of handlers and execute....
void* handler = event[scancode];
handler();
}