# ten1seven/what-input

A global utility for tracking the current input method (mouse/pointer, keyboard or touch).

Repository: https://github.com/ten1seven/what-input
Canonical: https://ross.abutalabs.com/products/what-input
Homepage: https://ten1seven.github.io/what-input
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2025-02-17T22:16:57+00:00

## Health v2 (maintenance only)
Score: 26/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 7, release rhythm 8, longevity 100
- inputs: {"age_days": 4185, "days_push": 562, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1377, forks 79 (observed 2026-08-28T04:04:33.385232+00:00)

## What it is
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
- artifact type: library
- maturity: stable
- function: ui-components, developer-tools
- domain: web-development, frontend, accessibility
- platform: browser
- tags: input-tracking, focus-styles, a11y, data-attributes, event-listeners, javascript

## Member repositories
- ten1seven/what-input (main) score 26

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:33.385232+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:27.892378+00:00, confidence not recorded.
  - readme: https://github.com/ten1seven/what-input (fetched 2026-08-28T04:04:33.385232+00:00, sha f95c68351334)
  - homepage: https://ten1seven.github.io/what-input (fetched 2026-08-29T11:56:54.443738+00:00, sha 1914d330b6f1)
  - registry_npm: https://registry.npmjs.org/what-input (fetched 2026-08-29T11:56:54.446654+00:00, sha 731fd5a7f8db)
- Data as of 2026-08-30T08:39:29.467469+00:00.
