Lovely.IO

The Next Generation of Front-Side

Package Info

Links
Size
702 Bytes (gzipped)
Tags
DOM, STL, events
Author
Nikolay Nemshilov
License
MIT
Versions
CDN Links
Dependencies

Keys

Keys is a little helper for the dom package that allows you to specify human readable keyboard combinations as the event names

Lovely(['dom', 'keys'], function($) {
  $(document)
    .on('ctrl-z',       undo_stuff)
    .on('ctrl shift z', redo_stuff)
    .on('ctrl alt del', kill_em_all)
});

NOTE: Firefox still doesn't support event.keyCode on non-ascii keyboard layouts, so non-ascii keyboard combinations won't work in there

Copyright And License

This project is released under the terms of the MIT license

Copyright (C) 2011 Nikolay Nemshilov