All Projects → yuanguandong → react-keyevent

yuanguandong / react-keyevent

Licence: MIT license
An easy-to-use keyboard event react component, Package size less than 3kb

Programming Languages

typescript
32286 projects
Less
1899 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to react-keyevent

Chordly
Chordly is a javascript library that may be used to detect and act upon key sequences entered by a user.
Stars: ✭ 14 (-63.16%)
Mutual labels:  keyboard, event, keyboard-listeners, keyboard-shortcuts, keyboard-events
Keyboardjs
A JavaScript library for binding keyboard combos without the pain of key codes and key combo conflicts.
Stars: ✭ 1,881 (+4850%)
Mutual labels:  keyboard, keyboard-shortcuts, keyboard-events
ember-key-manager
A service for (un)binding keyboard up and down events.
Stars: ✭ 39 (+2.63%)
Mutual labels:  keyboard, keyboard-shortcuts, keyboard-events
Ng Keyboard Shortcuts
Dead Simple Keyboard Shortcuts Management for Angular
Stars: ✭ 121 (+218.42%)
Mutual labels:  keyboard, keyboard-shortcuts
Repeat
Cross-platform mouse/keyboard record/replay and automation hotkeys/macros creation, and more advanced automation features.
Stars: ✭ 763 (+1907.89%)
Mutual labels:  keyboard, keyboard-shortcuts
Quickcut
QuickCut is a cross-platform keyboard manager that both facilitates key mapping and allows the configuration of global hotkeys triggering user defined actions.
Stars: ✭ 84 (+121.05%)
Mutual labels:  keyboard, keyboard-shortcuts
Switch Desktop
⚡️ Keyboard-driven commands to navigate your apps faster
Stars: ✭ 320 (+742.11%)
Mutual labels:  keyboard, keyboard-shortcuts
Mousetrap
Simple library for handling keyboard shortcuts in Javascript
Stars: ✭ 10,937 (+28681.58%)
Mutual labels:  keyboard, keyboard-shortcuts
Aquatouch
Dynamic Custom Macros for your MacBook TouchBar! (Supports 40+ Apps and Websites)
Stars: ✭ 125 (+228.95%)
Mutual labels:  keyboard, keyboard-shortcuts
Keybd event
For simulate key press in Linux, Windows and Mac in golang
Stars: ✭ 175 (+360.53%)
Mutual labels:  keyboard, event
Powerkey
Remap your Macbook's power key to Forward Delete
Stars: ✭ 212 (+457.89%)
Mutual labels:  keyboard, keyboard-shortcuts
Combokeys
Web browser keyboard shortcuts. CommonJS, NPM.
Stars: ✭ 675 (+1676.32%)
Mutual labels:  keyboard, keyboard-shortcuts
Shortcutmapper
A visual keyboard shortcuts explorer for popular applications.
Stars: ✭ 657 (+1628.95%)
Mutual labels:  keyboard, keyboard-shortcuts
Evscript
A tiny sandboxed Dyon scripting environment for evdev input devices that lets you do e.g. xcape in Wayland
Stars: ✭ 91 (+139.47%)
Mutual labels:  keyboard, keyboard-shortcuts
Hotkeys
➷ A robust Javascript library for capturing keyboard input. It has no dependencies.
Stars: ✭ 5,165 (+13492.11%)
Mutual labels:  keyboard, keyboard-shortcuts
Keymapper
📱 An Android app that maps any keys to actions.
Stars: ✭ 207 (+444.74%)
Mutual labels:  keyboard, keyboard-shortcuts
MyAHKScript
An AutoHotkey script that I use on the daily basis for my PC. Comes with an installer that takes care of everything for you.
Stars: ✭ 22 (-42.11%)
Mutual labels:  keyboard, keyboard-shortcuts
input-remapper
🎮 An easy to use tool to change the mapping of your input device buttons.
Stars: ✭ 1,142 (+2905.26%)
Mutual labels:  keyboard, keyboard-shortcuts
Chromium Vim
Vim bindings for Google Chrome.
Stars: ✭ 2,150 (+5557.89%)
Mutual labels:  keyboard, keyboard-shortcuts
use-keyboard-shortcut
A custom hook that allows adding keyboard shortcuts to React applications
Stars: ✭ 41 (+7.89%)
Mutual labels:  keyboard, keyboard-shortcuts

React Keyevent

npm version npm versionnpm version npm version npm version npm version

An easy-to-use keyboard event react component, Can achieve a variety of custom keyboard functions, Package size less than 3kb

非常容易使用的一个键盘事件监听react组件,可实现各种自定义快捷键功能,只有不到3kb

repository-open-graph-template副本

Repository

https://github.com/yuanguandong/react-keyevent

Live demo

https://react-keyevent.netlify.app/

https://yuanguandong.github.io/react-keyevent/

Live code

Install

npm i react-keyevent -S

How to use

import React, { useState } from "react";
import Keyevent from "react-keyevent";

const TopSide = () => {
  const [count, setCount] = useState(0);
  const onAltT = () => {
    setCount(count + 1);
  };
  return (
    <Keyevent
      className="TopSide"
      events={{
        onAltT,
      }}
      needFocusing
    >
      <span className="tip">Click To Focusing</span>
      <div className="group">
        <span className="key">Alt</span>
        <span className="key">T</span>
        <span className="count">{count}</span>
      </div>
    </Keyevent>
  );
};
export default TopSide

Props

property required type defaultValue description
events true { [key: string]: (e: KeyboardEvent) => void } null The binding keyboard events 绑定的键盘事件
needFocusing false boolean false 是否需要聚焦,若值为true,则需要聚焦Focus这个容器组件(点击)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].