ten1seven/what-input
A global utility for tracking the current input method (mouse/pointer, keyboard or touch). observed · 2026-08-28
Health v2 · maintenance only
26/100
- Activity 7
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4185
- days_rel: n/a
- days_push: 562
- n_releases_24m: 0
Adoption not part of the score
1377 stars · 79 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A small JavaScript utility that tracks the current input method (mouse, keyboard, or touch) by listening to window events and exposing it via data attributes and a simple API. It helps developers style and script interactions differently based on how users are interacting with the page.
Use cases
- suppress focus rings only for keyboard users
- style form controls differently for mouse vs keyboard vs touch
- detect whether the user is on a touch device
- track input intent across page navigation with session storage
- run callbacks when the input method changes
When to choose
- you need to differentiate focus/hover styles by input method
- you want a tiny dependency-free utility for input detection
- you need input method persistence across pages
When to avoid
- you need full device or browser detection
- your framework already provides input tracking
- you only need a media-query-based touch check
Facets
library · maturity stable
ui-components developer-tools web-development frontend accessibility browser input-tracking focus-styles a11y data-attributes event-listeners javascript
3 sources
- readme: https://github.com/ten1seven/what-input · fetched 2026-08-28 · f95c68351334
- homepage: https://ten1seven.github.io/what-input · fetched 2026-08-29 · 1914d330b6f1
- registry_npm: https://registry.npmjs.org/what-input · fetched 2026-08-29 · 731fd5a7f8db
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| ten1seven/what-input | main | 26 |
For agents
markdown · JSON · MCP: product_card(name="ten1seven/what-input")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem