Events, especially within an interactive environment such as a browser, are what make JavaScript essential. So in this post we have gathered some of Javascript libraries for handling events and inputs when a user clicks a button or presses a key.
Mousetrap
A simple library for handling keyboard shortcuts in Javascript.
Hotkeys
HotKeys.js is an input capture library with some very special features, it is easy to pick up and use, has a reasonable footprint, and has no dependencies.
What Input
A global utility for tracking the current input method (mouse, keyboard or touch).
Gridnav
Gridnav is a JavaScript that allows users to navigate around a list of items easier and in a more accessible manner. Given that your list consists of keyboard accessible elements, the normal way to navigate them is by tabbing to each element in order.
Clipboard
Copying text to the clipboard shouldn’t be hard. It shouldn’t require dozens of steps to configure or hundreds of KBs to load. But most of all, it shouldn’t depend on Flash or any bloated framework.
blueimp Gallery
blueimp Gallery is a touch-enabled, responsive and customizable image and video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading and can be extended to display additional content types.
Keypress
A keyboard input capturing utility in which any key can be a modifier key.
Trial.js
Mouse position monitoring and user input prediction.
Tap
This is a Javascript library for easy unified handling of user interactions such as mouse, touch and pointer events.
Numscrubber
Let’s change values of input numbers by dragging the mouse left & right.
Waypoints
Waypoints is a library that makes it easy to execute a function whenever you scroll to an element.
Scrollama
Scrollama is a modern & lightweight JavaScript library for scrollytelling using IntersectionObserver in favor of scroll events.
Pressure
Pressure is a JavaScript library for handling Force Touch, 3D Touch, and Pointer Pressure on the web, bundled under one library with a simple API that makes working with them painless.
Event.js
Multi-touch, gestures, and other events—click, dblclick, dbltap, tap, longpress, drag, swipe, pinch, rotate, shake. For pointer events, each listener can handle anywhere from 1 to 12 fingers at a time, or more, depending on the device.
Umbrella
Lightweight javascript library for DOM manipulation and events.
Tocca.js
Super lightweight script to detect via Javascript events like ‘tap’ ‘dbltap’ ‘swipeup’ ‘swipedown’ ‘swipeleft’ ‘swiperight’ on any kind of device.