I’m creating a system to detect some key press but CTRL+SHIFT+E is not working to me. Here is my code:
function handleKeyPress(event) {
if (event.ctrlKey && event.shiftKey && event.key === 'E') {
event.preventDefault();
console.log('Key press!');
}
}
document.addEventListener('keydown', handleKeyPress);
If I change E
key to T
key, for example, it will work!
There are no errors. How can I solve this? I’m using Google Chrome and I’m not sure if this is happening in other browsers.
Thank you
4