#921·ink

Deprecate pasted-text fallback in `useInput` and make `usePaste` the only paste API

Author: sindresorhusCreated Mar 30, 2026Updated Mar 31, 2026

Probably not soon, but at some point.


Summary

useInput currently still receives pasted text when no usePaste listener is active. This is legacy behavior and makes input semantics inconsistent.

Proposal

  • Deprecate pasted-text delivery via useInput in the current major.
  • In the next major, stop forwarding bracketed paste payloads to useInput.
  • Keep usePaste as the dedicated API for paste blobs.

Why

  • Clearer API boundaries: key events (useInput) vs paste blobs (usePaste).
  • Simpler handlers: no mixed key/paste assumptions in one callback.
  • More predictable behavior across terminals.

Migration

If your app relies on pasted text in useInput, switch to usePaste for paste handling and keep useInput for typed key events.