ink-cartridge
    Preparing search index...

    Function closeModalLayer

    • Close a registered modal layer by its ID.

      Removes the modal layer and restores keyboard control to the layers and screen below it.

      Parameters

      • targetModalLayerId: string

      Returns void

      const { closeModalLayer } = useScreenSystem();
      // from the modal element's own key binding:
      boundKeyboard(['q'], () => closeModalLayer('confirm-dialog'));