yuvrajkarna2717/react-hook-granth

[Feature]: Add useKeyboard hook for keyboard shortcuts

オープン

#10 opened on 2025/12/06

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (1 件のフォーク)auto 404
enhancementgood first issuehelp wanted

Repository metrics

Stars
 (3 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Hook Name

useKeyboard

Feature Description

Description: Create a hook for handling keyboard shortcuts and key combinations in React components.

Requirements:

  • Single key and key combinations
  • Modifier keys support (Ctrl, Alt, Shift)
  • Prevent default behavior option
  • Multiple shortcuts per component

Use Case

It handles keyboard shortcuts and key combinations in React components.

Proposed API

useKeyboard('Escape', handleEscape);
useKeyboard(['Ctrl', 'S'], handleSave);

コントリビューターガイド