Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

keyboard

v2.6.5arrow_drop_down
v2.11.1
v2.6.5
v2.5.5
STATUS
Passing
DOWNLOADS
6,935
LICENSE
Apache 2.0
VISIBILITY
Public
PUBLISHED
A year ago
SIZE
1 KB
A handler of keyboard key presses.
2 contributors
Install keyboard as a package?
Copied
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
chevron_left
chevron_right

Keyboard

A handler of keyboard key presses.

Usage

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