Skip to content
R

react-keydown

Lightweight keydown wrapper for React components

by glorthoFree

#1239in UI Libraries
0In stores

Description

react-keydown is a lightweight library for keyboard handling in React. It works as a higher-order component or a decorator that passes keydo…

Highlights

  • Higher-order component or decorator
  • Declarative key bindings for methods
  • Scoped to the component and its children
  • Modifier key combinations
  • About 2kb with one document listener

Ratings & Reviews

No ratings yet

Be the first to rate react-keydown.

People also visit

R

react-keyboard

A declarative library for handling hotkeys and focus within a React application

UI Libraries
Launch
R

react-hotkeys

A declarative library for handling hotkeys and focus within a React application

UI Libraries
Launch
T

@TanStack/hotkeys

Type-Safe keyboard shortcuts library with awesome devtools

UI Libraries
Launch
C

@codler/react-native-keyboard-aware-scroll-view

A React Native ScrollView component that resizes when the keyboard appears

UI Libraries
Launch
R

react-native-keyboard-aware-scroll-view

A React Native ScrollView component that resizes when the keyboard appears

UI Libraries
Launch
R

react-native-keyboard-accessory

A React Native Keyboard Accessory (View, Navigation) Component

UI Libraries
Launch

react-keydown FAQ

What does react-keydown do?

It passes keydown events to React components, or calls their methods when designated keys are pressed.

How big is it?

The README says it is about 2kb compressed and gzipped.

Does it support modifier keys?

Yes. The README says it supports standard modifier key combinations.

Which browsers are supported?

The README says it works in all browsers except IE 8 and below.

Are there any caveats?

Yes. The README has a caveat section about input, textarea and select elements.

What are the best react-keydown alternatives?

Popular alternatives to react-keydown include react-keyboard, react-hotkeys and @TanStack/hotkeys. See all react-keydown alternatives

Developer Stuff

Badges