uwp-keycodes
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

uwp-keycodes

A simple TypeScript enum for keycodes including Gamepad keys in Universal Windows Platform (UWP)

Installation

npm install --save uwp-keycodes

Usage

Instead of using

  Observable.fromEvent<KeyboardEvent>(window, 'keydown', true)
    .filter(ev => ev.keyCode === 196)

you can write

  import {keys} from 'uwp-keycodes';
 
  Observable.fromEvent<KeyboardEvent>(window, 'keydown', true)
    .filter(ev => ev.keyCode === keys.GamepadB)

/uwp-keycodes/

    Package Sidebar

    Install

    npm i uwp-keycodes

    Weekly Downloads

    41

    Version

    1.1.1

    License

    MIT

    Last publish

    Collaborators

    • mcph