- move_keyb_mod_selection(select_keybindingdb_pointer(c1), c2);
-}
-
-
-
-extern uint8_t player_control(int key)
-{
- char * cmd = get_command_to_keycode(world.kb_global.kbs, key);
- if (NULL == cmd && 0 != world.wmeta.active)
- {
- struct WinConf * wc = get_winconf_by_win(world.wmeta.active);
- cmd = get_command_to_keycode(wc->kb.kbs, key);
- }
- if (NULL != cmd
- && ( try_player_cmd(cmd, "wait", "wait", 0)
- || try_player_cmd(cmd, "drop", "drop",world.player_inventory_select)
- || try_player_cmd(cmd, "pick", "pick_up", 0)
- || try_player_cmd(cmd, "use", "use", world.player_inventory_select)
- || try_player_cmd(cmd, "player_u", "move", 'N')
- || try_player_cmd(cmd, "player_d", "move", 'S')
- || try_player_cmd(cmd, "player_r", "move", 'E')
- || try_player_cmd(cmd, "player_l", "move", 'W')))
- {
- return 1;
- }
- return 0;
+ return ( try_0args(command, "winconf", toggle_winconfig)
+ || try_0args(command, "reload_conf", reload_interface_conf)
+ || try_0args(command, "save_conf", save_interface_conf)
+ || try_0args(command, "map_c", map_center)
+ || try_1args(command, "scrl_r", scroll_pad, '+')
+ || try_1args(command, "scrl_l", scroll_pad, '-')
+ || try_1args(command, "to_a_keywin", toggle_window, 'k')
+ || try_1args(command, "to_g_keywin", toggle_window, '0')
+ || try_1args(command, "to_wg_keywin", toggle_window, '1')
+ || try_1args(command, "to_wk_keywin", toggle_window, '2')
+ || try_1args(command, "to_mapwin", toggle_window, 'm')
+ || try_1args(command, "to_infowin", toggle_window, 'i')
+ || try_1args(command, "to_inv", toggle_window, 'c')
+ || try_1args(command, "to_logwin", toggle_window, 'l')
+ || try_1args(command, "cyc_win_f", cycle_active_win, 'f')
+ || try_1args(command, "cyc_win_b", cycle_active_win, 'b')
+ || try_1args(command, "inv_u", nav_inventory, 'u')
+ || try_1args(command, "inv_d", nav_inventory, 'd')
+ || try_1args(command, "map_u", map_scroll, 'N')
+ || try_1args(command, "map_d", map_scroll, 'S')
+ || try_1args(command, "map_r", map_scroll, 'E')
+ || try_1args(command, "map_l", map_scroll, 'W')
+ || try_1args(command, "to_height_t", toggle_win_size_type, 'y')
+ || try_1args(command, "to_width_t", toggle_win_size_type, 'x')
+ || try_1args(command, "grow_h", growshrink_active_window, '*')
+ || try_1args(command, "shri_h", growshrink_active_window, '_')
+ || try_1args(command, "grow_v", growshrink_active_window, '+')
+ || try_1args(command, "shri_v", growshrink_active_window, '-')
+ || try_1args(command, "shift_f", shift_active_win, 'f')
+ || try_1args(command, "shift_b", shift_active_win, 'b')
+ || try_1args(command, "g_keys_m", mod_selected_keyb, 'G')
+ || try_1args(command, "wg_keys_m", mod_selected_keyb, 'g')
+ || try_1args(command, "wk_keys_m", mod_selected_keyb, 'k')
+ || try_1args(command, "w_keys_m", mod_selected_keyb, 'w')
+ || try_2args(command, "wg_keys_u", move_keyb_selection, 'g', 'u')
+ || try_2args(command, "wg_keys_d", move_keyb_selection, 'g', 'd')
+ || try_2args(command, "wk_keys_u", move_keyb_selection, 'k', 'u')
+ || try_2args(command, "wk_keys_d", move_keyb_selection, 'k', 'd')
+ || try_2args(command, "w_keys_u", move_keyb_selection, 'w', 'u')
+ || try_2args(command, "w_keys_d", move_keyb_selection, 'w', 'd')
+ || try_2args(command, "g_keys_u", move_keyb_selection, 'G', 'u')
+ || try_2args(command, "g_keys_d", move_keyb_selection, 'G', 'd'));