Binding everything might not be as hard as you would think if you're going to bind everything to the same function pointer that handles the real dispatch logic:
| u32 binding_combinations[] = {0, MDFR_SHIFT, MDFR_CTRL, MDFR_SHIFT|MDFR_CTRL,
MDFR_ALT, MDFR_SHIFT|MDFR_ALT, MDFR_CTRL|MDFR_ALT, MDFR_SHIFT|MDFR_CTRL|MDFR_ALT};
for (int i = 0; i < ArrayCount(binding_combinations); i += 1){
for (int j = 0; j < 255; j += 1){
bind(context, binding_combinations[i], j, primary_dispatch_handler_command);
}
}
|
Then you can use the API "User_Input get_command_input(Application_Links *app)" inside your single dispatch handler to see what input triggered the command redo the dispatch logic manually with a switch or something. Also, that code is probably not going to compile or handle everything as written, I'm just trying to demonstrate the idea. If you get what I'm trying to say hopefully you can fiddle around with it to make it work?
Unfortunately I don't think there's any better way to make your approach work in the current system because you cannot submit new command maps after initialization in the latest version.
A completely different route would be to save as much of the 4coder state as you can into a file, and then write the necessary code to launch a new 4coder with a different custom dll and reload that 4coder state. Probably a bit of a harder route, but it has the added side benefit of giving you reloadable state between runs at the same time.