MooKeys 1.0

Is a keycommand utility which provides a multi-key keystroke recognizer as well as a pattern scanner for quickly typed words or machine fed input (such as a magstripe reader or MICR reader), as well as an implementation of the 'cardSwipe' event for magnetic card readers in the browser.



Details

Author
Abbey Sparrow
Current version
1.0
GitHub
khrome/MooKeys.js
Downloads
1679
Category
Utilities
Tags
Report
GitHub Issues

Releases


Dependencies

  • core/1.2.4: *

How to use

To use a magnetic swipe, you just need to attach a listener to the document:

MooKeys.on();
MooKeys.register(new MooCreditSwipe());
document.addEvent('cardSwipe', function(event){
    // manipulate event.swipe here
});

To define a key sequence:

MooKeys.register(new MooKeyPattern('meta+s', function(){
    // implement save here!
}));

To make your own scanner, just define it's regex:

MooKeys.register(new MooKeySequence(/help/i, function(event){
    // provide some help!
}));

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus