1.0.9 • Published 10 months ago

it2.0-keyboardshortcuts v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

Keyboard Shortcuts

This component allows you to create and manage keyboard shortcuts easily.

Installation

To install this package, run the following command:

npm i it2.0-keyboardshortcuts

usage

Create the KeyboardShortcuts component as given below and call the component in your layout.js:

import KeyboardShortcuts from "it2.0-keyboardshortcuts";

function shortcuts() {
  const shortcuts = [
    { key: "1", url: "/page1" }, // Ctrl+1
    { key: "2", url: "/page2" }, // Ctrl+2
    { key: "3", url: "/page3" }, // Ctrl+3
    { key: "0", url: "/homePage" }, // Ctrl+0
  ];

  return (
    <div>
      <KeyboardShortcuts shortcuts={shortcuts} />
      {/* Rest of your app */}
    </div>
  );
}

export default shortcuts;
1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago