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

    Function checkGlobalKey

    • Check whether a global key entry should fire for the current event.

      Evaluates key-name matching, category whitelist, and screen-level global-key override (cover mechanism).

      Parameters

      • entry: GlobalKeyEntry

        The global key entry to evaluate.

      • eventNames: string[]

        Normalized key names from the current event.

      • topComponent: unknown

        The topmost screen component, or null.

      • layersRef: Map<unknown, PageKeyboardLayer>

        Map of all page keyboard layers.

      Returns boolean

      true if the global key matches and is not overridden.

      // Inside a custom processor:
      for (const entry of resolvedGlobalKeys) {
      if (checkGlobalKey(entry, eventNames, ctx.topComponent, ctx.layersRef)) {
      entry.operate();
      return true;
      }
      }