ARTICLE AD BOX
When I press the "Backslash" key and "ArrowDown" keys at the same time, the browser fires the keyup event for the Backslash, even though I haven't released the Backslash key on my keyboard, before firing the ArrowDown keydown event. This happens specifically when I am holding the ctrl key down.
The problem doesn't occur with the other arrow keys. I get the exact same behaviour across chrome, firefox, and edge, with 100% reproducibility.
I'm using Windows 11.
Sample code:
const pressed = new Set(); window.addEventListener("keyup", ev => { pressed.delete(ev.code); console.log("KEYUP:", ev.code); }); window.addEventListener("keydown", ev => { pressed.add(ev.code); console.log("KEYDOWN:", ev.code); if (ev.ctrlKey && pressed.has("Backslash") && pressed.has("ArrowLeft")) { ev.preventDefault(); console.log("COMBO: ctrl + backslash + arrow-left"); return; } if (ev.ctrlKey && pressed.has("Backslash") && pressed.has("ArrowUp")) { ev.preventDefault(); console.log("COMBO: ctrl + backslash + arrow-up"); return; } if (ev.ctrlKey && pressed.has("Backslash") && pressed.has("ArrowDown")) { ev.preventDefault(); console.log("COMBO: ctrl + backslash + arrow-down"); return; } if (ev.ctrlKey && pressed.has("Backslash") && pressed.has("ArrowRight")) { ev.preventDefault(); console.log("COMBO: ctrl + backslash + arrow-right"); return; } });Here are the two different outputs I'm getting. The undefined at the top is from pasting the above code. For ArrowLeft (and the other arrows other than ArrowDown), it works perfectly. I have a keydown for the backslash and arrow key, the combo message is printed, and the keyup events fire.

For ArrowDown, I get this result instead. I am not releasing the backslash key before pressing ArrowDown, even though that appears to be the case. So keyup is being fired for the Backslash even thought it is still held down as, and after, I press the ArrowDown. And it is being fired before the keydown for ArrowDown is fired, no less, so the combo message is not printed.

Again, this only happens when the ctrl key is pressed. When I change it to not need ev.ctrlKey, it works fine. Also, changing the order in which the listeners are added (i.e. adding the keydown listener to the window before adding the keyup) makes no difference.
My two best ideas are that ctrl + Backslash + ArrowDown already has some other special function (whether in the browser or in Windows) that is interfering with things, or that my keyboard is faulty. Even if you don't know the cause of the issue, it would be nice to know if the same thing happens to others, or it's just my device.
