Keypress v2.0 Release Notes

Release Date: 2014-02-05 // over 8 years ago
    • Keypress now has a listener class that must be instantiated. The functions that were previously in the global window.keypress object are now public methods of the window.keypress.Listener class.
    • Each instance of a Keypress listener can be bound to a DOM element by passing in the element to the listener's constructor.
    • 0️⃣ Combos now default to being ordered (the property is now called is_unordered and is false by default).
    • 0️⃣ Combos' handlers preventDefault unless the handler returns true.
    • The "combo" public method is now called "simple_combo".
    • 0️⃣ The basic combo helpers for simple, counting and sequence combos no longer have a third prevent_default optional parameter.
    • 🔊 Debugging console logs can be enabled by setting keypress.debug to true.
    • All key event callbacks send a third argument specifying whether the event is firing again automatically because the key has remained pressed down.