@cerebral/shortcuts

3.2.2 • Public • Published

@cerebral/shortcuts

Install

NPM

npm install @cerebral/shortcuts

Description

This is a tiny module that allows you to bind keyboard shortcuts to Cerebral signals.

It's created using a very nice library called "shortway" by Thiago Santos

Instantiate

import shortcuts from '@cerebral/shortcuts'

const controller = Controller({
  signals: {
    testSignal: () => console.log('shortcut pressed!')
  },
  modules: {
    shortcuts: shortcuts({
      'ctrl+s': 'testSignal'
    })
  }
})

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i @cerebral/shortcuts

Weekly Downloads

4

Version

3.2.2

License

MIT

Unpacked Size

7.25 kB

Total Files

7

Last publish

Collaborators

  • fweinb
  • cerebral.js
  • christianalfoni
  • guria
  • gbucher
  • henri-hulski