Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input remapping is bugged on HTML5 #4

Open
maferVV opened this issue Dec 6, 2022 · 0 comments
Open

Input remapping is bugged on HTML5 #4

maferVV opened this issue Dec 6, 2022 · 0 comments

Comments

@maferVV
Copy link

maferVV commented Dec 6, 2022

I struggled with this for days so Im posting in case anyone googles this. The reason HTML5 input remapping is bugged in HTML5 builds is because of this code from the step event in object SetInput (line 30):

   if(keyboard_check_pressed(vk_anykey))
    {
        ds_map_replace(INPUT_MANAGER.customKeys,input, keyboard_lastkey);
        DONE = true;
    }

The problem is that keyboard_lastkey is broken and in fact had to be fixed in GMS 2.2. Simply change keyboard_lastkey to keyboard_key like so:

    if(keyboard_check_pressed(vk_anykey))
    {
        ds_map_replace(INPUT_MANAGER.customKeys,input, keyboard_key);
        DONE = true;
    }

this should be changed in the original code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant