I am not sure how to do 'keydown' with pure JavaScript.
Here's how I did it with jQuery, but is there a way to do the same thing with pure JS also ? I just wanna check if there is a way and to learn how to do it, as well as to see difference and length of code. Thank you.
$('body').on('keydown', function(e) {
if (e.keyCode === 27) return false;
});
EDIT: It is used to disable "Esc" button!