ink-cartridge
    Preparing search index...

    Function useModalMissListener

    • Register a callback for key presses that miss every modal layer binding.

      The listener is scoped to the surrounding modal layer element automatically; outside a modal layer the hook does nothing. The listener is removed automatically when the component unmounts or when the callback or options change.

      Parameters

      Returns () => void

      A no-op function; actual unsubscription happens in an effect cleanup.

      Give feedback inside a modal layer when the user presses a key no modal binding handles:

      function HelpModal() {
      const [hint, setHint] = useState('');
      useModalMissListener(() => setHint('Unknown key — press q to close'));
      return <Text>{hint}</Text>;
      }