I want to use a keyDown event on a div in React. I do:
componentWillMount() { document.addEventListener(\"keydown\", this.onKeyPressed.bind(this));
The answer with
<div className="player" onKeyDown={this.onKeyPressed} tabIndex={0} >
works for me, please note that the tabIndex requires a number, not a string, so tabIndex="0" doesn't work.