constructor(props) {
    super(props);

    this.state = {
      afterOpen: false,
      beforeClose: false
    };

    this.shouldClose = null;
    this.moveFromContentToOverlay = null;
  }
We need to support the deprecated `KeyboardEvent.keyCode` in addition to
`KeyboardEvent.code` for apps that still support IE11. Can be removed when
`react-modal` only supports React >18 (which dropped IE support).