For this specific action, I must press and hold the left arrow key first, followed by the right arrow key, and then the up arrow key. However, it seems that the up arrow key is not being triggered as expected.
It appears that there may be some limitations or restrictions in the browser or another element causing this issue. Unfortunately, I have been unable to find any information on why this is happening.
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');
}
}