{"library":"what-input","type":"library","category":null,"description":"what-input is a client-side JavaScript utility designed to accurately track the user's current input method, distinguishing between mouse, keyboard, and touch interactions. It operates by listening for specific DOM events (mousedown, keydown, touchstart) and dynamically applies `data-whatinput` and `data-whatintent` attributes to the `window` object, making the current input state accessible via CSS or a simple JavaScript API. Currently at version 5.2.12, the package maintains an active release cadence, primarily focusing on bug fixes, TypeScript definition enhancements, and minor feature additions. A key feature is its default use of session storage to persist input/intent across page navigations, improving user experience by maintaining context. It also smartly manages form interactions, preserving the `data-whatintent` as `mouse` even when a user types into form fields, preventing unnecessary input state changes.","language":"javascript","status":"active","version":"5.2.12","tags":["javascript","accessibility","a11y","input","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install what-input","imports":["import 'what-input';","import whatInput from 'what-input';","const whatInput = require('what-input');"]},{"cmd":"yarn add what-input","imports":[]},{"cmd":"pnpm add what-input","imports":[]}],"homepage":null,"github":"https://github.com/ten1seven/what-input","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/what-input","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/what-input/compatibility"}}