# What Input?
**A global utility for tracking the current input method (mouse, keyboard or touch).**
## What Input is now v5
Now with more information and less opinion!
What Input adds data attributes to the `window` based on the type of input being used. It also exposes a simple API that can be used for scripting interactions.
## How it works
What Input uses event bubbling on the `window` to watch for mouse, keyboard and touch events (via `mousedown`, `keydown` and `touchstart`). It then sets or updates a `data-whatinput` attribute.
Pointer Events are supported but note that `pen` inputs are remapped to `touch`.
What Input also exposes a tiny API that allows the developer to ask for the current input, set custom ignore keys, and set and remove custom callback functions.
_What Input does not make assumptions about the input environment before the page is interacted with._ However, the `mousemove` and `pointermove` events are used to set a `data-whatintent="mouse"` attribute to indicate that a mouse is being used _indirectly_.
## Demo
Check out the demo to see What Input in action.
https://ten1seven.github.io/what-input
### Interacting with Forms
Since interacting with a form _always_ requires use of the keyboard, What Input uses the `data-whatintent` attribute to display a "buffered" version of input events while form ``s, `