@pangenerator/hotkeys

0.0.5 • Public • Published

Hotkeys helper library

Used in various interactive installations

Using the library

Install the library

npm install @pangenerator/hotkeys

Import the library

import Hotkeys from '@pangenerator/hotkeys'

Configure keys

import Hotkeys from './src/hotkeys.js'
      const hotkeys = new Hotkeys([
        { key: 'ArrowUp', meta: true, shift: true, alt: true, ctrl: true, description: 'Fired when Command + Shift + Alt/Option + Control + Arrow Up is pressed', callback: () => { console.log('UP') } },
        { key: '2', description: `Fired when '2' is pressed"`, callback: () => { console.log('2') }},
        { key: 'F', description: `Fired when 'F' is pressed"`, callback: () => { console.log('F') }},
      ])

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.5
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.5
    0
  • 0.0.4
    0
  • 0.0.3
    0

Package Sidebar

Install

npm i @pangenerator/hotkeys

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

4.18 kB

Total Files

5

Last publish

Collaborators

  • jkozniewski
  • kgolinski