title: Call setState with Click or Escape Key
body: <p>I have a React Modal that opens and closes via a <code>handler function</code>.</p>
  
  <p>I'd like to call that function with either a click event or with the use of the <code>esc</code> key for accessibility proposes.</p>
  
  <p>How could I track both events at the same time?</p>
  
  <p>So far I got the <code>esc</code> event as: </p>
  
  <pre><code> handleCloseModal = event =&gt; {
      if (event.keyCode === 27) {
        this.setState({ modal: false })
      }
    }
  </code></pre>
  
  <p>But then I lose the click functionality on </p>
  
  <pre><code>&lt;Modal 
    onClick={handleCloseModal} 
    role="button" tabIndex={0} 
    onKeyDown={handleCloseModal}
   /&gt;
  </code></pre>
  
  <p>How should I go about this?</p>