- if (key == get_available_keycode_to_action(world, "wait"))
- {
- player_wait(world);
- }
- else if (key == get_available_keycode_to_action(world, "player_u"))
- {
- move_player(world, NORTH);
- }
- else if (key == get_available_keycode_to_action(world, "player_r"))
- {
- move_player(world, EAST);
- }
- else if (key == get_available_keycode_to_action(world, "player_d"))
+ char * action_name = get_func_to_keycode(world.kb_global.kbs, key);
+ if (NULL == action_name && 0 != world.wmeta->active)