Skip to content

Cerebral 2 module to fire signals bound to keyboard shortcuts.

License

Notifications You must be signed in to change notification settings

reflog/cerebral-shortcuts-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cerebral-shortcuts-module

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

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

Here's how you can use it:

Example:
import shortcuts from 'cerebral-shortcuts-module';

const controller = Controller({
  signals: {
    testSignal: () => console.log("shortcut pressed!")
  },
  modules: {
    shortcuts: shortcuts({
      "ctrl+s": "testSignal"
    })
  },
  devtools: process.env.NODE_ENV === "production"
    ? null
    : Devtools({
        // If running standalone debugger. Some environments
        // might require 127.0.0.1 or computer IP address
      remoteDebugger: "localhost:8585"
    })
});

License

MIT License © Eli Yukelzon

About

Cerebral 2 module to fire signals bound to keyboard shortcuts.

Resources

License

Stars

Watchers

Forks

Packages

No packages published