UNPKG

@dotconnor/grommet

Version:

focus on the essential experience

117 lines (74 loc) 1.43 kB
## Keyboard A handler of keyboard key presses. ## Usage ```javascript import { Keyboard } from 'grommet'; <Keyboard onUp={() => {}} /> ``` ## Properties **target** Where to listen for the keyboard presses. Defaults to `component`. ``` component document ``` **onBackspace** Function that will be called when the user presses the backspace key. ``` function ``` **onComma** Function that will be called when the user presses the comma key. ``` function ``` **onDown** Function that will be called when the user presses the down key. ``` function ``` **onEnter** Function that will be called when the user presses the enter key. ``` function ``` **onEsc** Function that will be called when the user presses the esc key. ``` function ``` **onKeyDown** Function that will be called when the user presses any key. ``` function ``` **onLeft** Function that will be called when the user presses the left key. ``` function ``` **onRight** Function that will be called when the user presses the right key. ``` function ``` **onShift** Function that will be called when the user presses the shift key. ``` function ``` **onSpace** Function that will be called when the user presses the space key. ``` function ``` **onTab** Function that will be called when the user presses the tab key. ``` function ``` **onUp** Function that will be called when the user presses the up key. ``` function ```