Rewrites tools/gen_keycodes, the script that generates key mappings across the framework and the engine.
* Split gen_keycode to make maintenance easier.