Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

benlenarts/KeySequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

KeySequence

Create custom events for sequences of key presses.

Screenshot

How to use

Create a custom event by calling addKeySequence with an event name and an array of key names:

#JS
Element.Events.addKeySequence('konamicode', 'up up down down left right left right b a'.split(' ')); 

Now you can attach handlers to this new event:

#JS
document.addEvent('konamicode', function() { alert('KONAMI'); });

For more examples please check out the demo!

About

Mootools plugin to create events for sequences of key presses

Resources

Stars

Watchers

Forks

Packages

No packages published