SiliconGhetto Engine API
    Preparing search index...

    Function keyPressed

    • Check if a key was pressed this frame (fires once per key press, not continuously).

      Parameters

      • key: string

        The key name (e.g. "ArrowUp", "e", " " for space)

      Returns boolean

      True if the key was pressed this frame

      if (sg.keyPressed(' ')) { jump(); }