stratus-keyboard

scoped key bindings for browserify

npm install stratus-keyboard
5 downloads in the last month

Stratus:Keyboard

Browserify module for scoped keybindings, used by Stratus Editor.

Usage

keyboard  = require "stratus-keyboard"

# Configure the scope.
keyboard "your-scope",
  "\n":        -> # select something...
  ".":         ->
  "Down":      ->
  "Control-s": -> # save a file...
  "Control-t": -> # open a tab...
  "otherwise": (key) ->

# Set the scope.
keyboard.scope "your-scope"

# Get the current scope.
keyboard.scope()
# => "your-scope"

License

See LICENSE.

npm loves you