JSPM

typed-keys

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q21418F
  • License MIT

Handle keyboard input with type hints!

Package Exports

  • typed-keys
  • typed-keys/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (typed-keys) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

typed-keys

Handle keyboard input with type hints!

Example

import { matchKeys } from "typed-keys";

// returns true if the keyboard input event is the key R
matchKeys(e, "R");
// check for multiple key combinations
matchKeys(e, ["Ctrl+P", "Shift+Alt+K"]);

Install

Node.js

npm install typed-keys

or

yarn add typed-keys

CDN

<script src="https://cdn.jsdelivr.net/gh/MarkintoshZ/Scribbled@latest/dist/scribbled.min.js">

Have fun coding!