Just another web resource (Keypress) that will help you to capture the keyboard inputs with the help of JavaScript just as you type. Why use Keypress? Because Keypress is an input capture library with some very special features, it is easy to pick up and use, has a reasonable footprint (~9kb), and has no dependencies.

As the script developer tried his best to keep Keypress very easy to use even for simple keyboard shortcuts, but if you don’t need the more advanced features, you might be better of with some of the simpler solutions out there. The API is subject to change as I get feedback, so if you’re after stability, this might not be for you just yet.

Let’s say that the keypress can be used for simple cases such as “x” is pressed, trigger a function and more advanced scenarios like creating combos of any type. Let me tell you that the library has callbacks for keyup + keydown events, an option exists for capturing the input only once and much more.

KeyPress JavaScript Library

KeyPress JavaScript Library

For especial tutorials click here.