html5 - JavaScript KeyDown event not triggered when multiple keys are held down -


i experiencing strange problem javascript. working on html5 canvas game uses keyboard input. 2 player mode of game involves 6 keys on keyboard being pressed , held down.

it seems "keydown" event stops being called after hold 4 or 5 keys down on keyboard.

the code using below:

window.onkeydown = function (event) {     console.log(event.keycode);     input.onkeydown(event.keycode); }; 

the console should log key code each key press down. however, seems report keycode first 4 or 5 hold down. causing controls 2 player version of game not work when both players press many keys.

is bug, limitation of javascript/html5, or doing wrong?

this limitation of usb keyboard not of code!


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -