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