React Hookers - v6.3.0
    Preparing search index...

    Function useKeyboardShortcut

    • Calls onAction when the shortcut is pressed.

      Characters 0–9 and A–Z are treated as Digit0–Digit9 and KeyA–KeyZ respectively.

      Parameters

      Returns void

      useKeyboardShortcut({
      // Ctrl+J on Windows, Command+J on macOS
      shortcut: ['Ctrl', 'J'],
      onAction() {
      // Handle shortcut action here
      },
      });