altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

Native displayOnscreenKeyboard stopped working with latest altv versions

Open xx7eVeN opened this issue 2 years ago • 8 comments

Description of the problem

When using displayOnscreenKeyboard there used to appear a textbox, now executing this command does not affect anything. Also other developers reported this in Discord.

Reproduction steps

Use my following method, which worked before latest altv updates and see that it does not work as expected anymore.

TypeScript:

async function GetPlayerInput(title: string, maxCharacters: number): Promise<string | false> {
    return await new Promise(resolve => {
        alt.addGxtText('INPUT_BOX_CUSTOM_TITLE', title);
        natives.displayOnscreenKeyboard(1, 'INPUT_BOX_CUSTOM_TITLE', '', '', '', '', '', maxCharacters);
        let timer = alt.setInterval(() => {
            alt.logError(natives.updateOnscreenKeyboard());
            if (natives.updateOnscreenKeyboard() == 1 || natives.updateOnscreenKeyboard() == 2) {
                alt.clearInterval(timer);
                if (natives.getOnscreenKeyboardResult()) {
                    if (natives.getOnscreenKeyboardResult().length > 0) {
                        resolve(natives.getOnscreenKeyboardResult());
                        return;
                    }
                }
                resolve(false);
            }
        }, 10);
    });
}

Expected behaviour

A textbox to appear as before

Additional context

No response

Operating system

Windows 10

Version

14.43

Reproduction tested

  • [ ] I confirm that I have made sure that this issue is also present on the newest dev version

xx7eVeN avatar Jun 28 '23 17:06 xx7eVeN

;) i confirm :p

alphasylvain avatar Jun 28 '23 17:06 alphasylvain

Confirmed on 15.0-dev360

xxshady avatar Jul 15 '23 15:07 xxshady

@Quantum2707 is it fixed?

xxshady avatar Mar 10 '24 00:03 xxshady

@xxshady closed because all other tickets related to this which stated the exact same were closed way before and because of inactivity on this ticket.

xx7eVeN avatar Mar 10 '24 00:03 xx7eVeN

How do you expect devs to fix this when it gets closed? Has this already been fixed? Re-opened it for now to keep track of issues.

xLuxy avatar Mar 10 '24 01:03 xLuxy

How do you expect devs to fix this when it gets closed? Re-opened.

@xLuxy As mentioned before, about 3-4 duplicates stating the exact same were confirmed fixed so there is no way this isnt able to be closed too. Unless people didnt test well in the others.

Cheers

xx7eVeN avatar Mar 10 '24 01:03 xx7eVeN

Reproduced this issue on 16.0.0-dev.299

xxshady avatar Mar 10 '24 01:03 xxshady

Any updates?

nils-kt avatar Sep 08 '24 12:09 nils-kt