stratus-keyboard
v0.0.2
Published
scoped key bindings for browserify
Downloads
7
Readme
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.