@cartridge-engine/keyboard-engine
    Preparing search index...

    Function pushKeyEntries

    • Push key entries into a rule array on container, deduplicating by key name, and return a cleanup function that removes exactly the entries that were added by this call.

      Used by allowModal, penetration, and stop to eliminate the repeated bookkeeping pattern across focus-target and layer-level branches.

      Parameters

      • container: KeyRuleContainer

        The object holding the target array (a layer or focus target).

      • property: "penetrationKeys" | "stoppedKeys" | "allowedKeys"

        Which array to operate on.

      • keys: string[]

        Normalized key names to add.

      • createEntry: (key: string) => KeyRule

        Factory that builds a KeyRule for a given key.

      Returns () => void

      A cleanup callback that removes the added entries.