src/components/sidenav/sidenav.js
function onKeyDown(ev) {
      var isEscape = (ev.keyCode === $mdConstant.KEY_CODE.ESCAPE);
      return isEscape ? close(ev) : $q.when(true);
    }
function onKeyDown(ev) {
      var isEscape = (ev.keyCode === $mdConstant.KEY_CODE.ESCAPE);
      return isEscape ? close(ev) : $q.when(true);
    }
function onKeyDown ( ev ) { var isEscape = ( ev . keyCode === $mdConstant . KEY_CODE . ESCAPE ) ; return isEscape ? close ( ev ) : $q . when ( true ) ; }
Auto-close sideNav when the `escape` key is pressed.
@param {KeyboardEvent} ev keydown event
Auto - close sideNav when the escape key is pressed .