I need to press and hold the left arrow, then the right arrow and then up arrow. The up arrow will not be triggered.
It looks like some restrictions of browser or something else, I'm not sure because can't find any information about that.
document.onkeydown = checkKey;
function checkKey(e) {
e = e || window.event;
if (e.keyCode == '38') {
console.log('up');
} else if (e.keyCode == '40') {
console.log('down');
} else if (e.keyCode == '37') {
console.log('left');
} else if (e.keyCode == '39') {
console.log('right');
}
}