component
prop | description | type |
---|---|---|
shortcut | string | |
desc | string | |
onShortcut | function |
<KeyPress
shortcut="shift a"
desc="toggle color of A"
onShortcut={this.toggleColor}
/>
high order component
export default withActiveShortcuts(Help);
component
<KeyPressProvider>
<div className="App"></div>
</KeyPressProvider>