0.0.2 • Published 12 years ago

stratus-keyboard v0.0.2

Weekly downloads
11
License
-
Repository
github
Last release
12 years ago

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.