Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

keyboard-key-code

Helper methods for dealing with key codes in keyboard events.

Install

npm i keyboard-key-code

Usage

import * as keyCode from 'keyboard-key-code'
keyCode.isTab({
  which: 9
})
// => true

API

is(event, code)

isArrowDown(event)

isArrowUp(event)

isEsc(event)

isEnter(event)

isSpace(event)

isSpaceOrEnter(event)

isTab(event)

License

MIT © Emil Johansson

About

Key code handler

Resources

License

Stars

Watchers

Forks

Packages

No packages published