Keys.js

Easy keybindings for browser applications!

View the Project on GitHub bitwalker/keys.js

Demo

For a quick view of the kind of functionality that Keys.js is intended to provide, check out the demo application. It is a simulated web mail application with configurable keyboard shortcuts.

Features

Browser Support

I've tested in the following browsers:

Module Support

Key.js has CommonJS and AMD module support, and can be used with require.js or another module loader.

External Dependencies

None. I wanted to ensure that Keys could stand on it's own, independent of any third party libraries. This makes it really easy to deploy on an existing project. The only exception is in IE<7 where the JSON object is not provided. In this case, you would need to add the JSON2 library to your project. This is only necessary if you plan on making use of the serialization features that Keys.js provides.

Potential Side Effects

Key.js polyfills Array.forEach, Array.map, Array.filter and Array.indexOf if they are not already implemented by the browser, or another library, for internal use. I currently have no plans to remove these polyfills, but if it is causing issues for you, let me know and I'll look into alternative approaches. If you are curious, the decision to polyfill those methods was due to my opinion that the improvements in code clarity and maintainability make them worthwhile.

Coming Soon!

License

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.