Dark Launch

JavaScript window.onkeydown without jQuery

Bind to window.onkeydown natively without jQuery.

Javascript
window.onkeydown = function( event ) {
    if ( event.keyCode === 27 ) {
        console.log( 'escape pressed' );
    }
};