8000 GitHub - dominicbarnes/ripplejs-shortcuts: Create custom keyboard combos · GitHub
[go: up one dir, main page]

Skip to content

About

Create custom keyboard combos

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

shortcuts

Adds custom keyboard shortcuts as directives using [yields/k]

var ripple = require('ripple');
var keys = require('shortcuts');

var View = ripple('<input on-send="{{this.submit}}" on-cancel="{{this.cancel}}" />')
  .use(keys('send', 'shift + enter'))
  .use(keys('cancel', 'escape'))

Install

component install ripplejs/shortcuts

Usage

keys(name, combo)

Add a new event called name that will add a directive called on-NAME when the keys in combo are pressed. See [yields/k] for more information.

keys(name)

Same as above, but defaults the keys to be the name. So instead of doing:

keys('enter', 'enter')

To create an on-enter directive, just do:

keys('enter')

About

Create custom keyboard combos

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0