Alivesoft
Member
keyboard_lastkey in HTML5 is not working properly in v1.4.9999, It does not record single key presses, you need to press and hold for a couple of seconds to respond. It works fine in native WIndows.
To see the problem, insert the following in a simple object's step event (and compile under HTML5):
// Get keyboard up/down/left/right
switch (keyboard_lastkey)
{
case 37: x -= 4; break;
case 39: x += 4; break;
case 38: y -= 4; break;
case 40: y += 4; break;
}
// Reset key
keyboard_lastkey = -1;
I know that there are simple ways to work around this, can somebody verify this is a new bug?
To see the problem, insert the following in a simple object's step event (and compile under HTML5):
// Get keyboard up/down/left/right
switch (keyboard_lastkey)
{
case 37: x -= 4; break;
case 39: x += 4; break;
case 38: y -= 4; break;
case 40: y += 4; break;
}
// Reset key
keyboard_lastkey = -1;
I know that there are simple ways to work around this, can somebody verify this is a new bug?
Last edited: