private InputMode getModeFromHotkey(int x) {
        AbilityType selected_ability = game.playerHandler.getAbilityFromHotkey(x);
        InputMode imode = AbilityType.abilityInputMode(selected_ability);
        if (imode == null) {
            return MOVEMENT;
        }
        switch (imode) {
            case AIM:
                game.aimData.enterAim(false, selected_ability);
                break;
            case DIRECTION:
                game.dirData.enterDir(game.playerHandler.getPlayerLocation(), selected_ability);
                break;
        }
        return imode;
    }