Source Academy Modules
    Preparing search index...

    Function input_key_down

    • Detects if a key input is pressed down. This function must be called in your update function to detect inputs. To get specific keys, go to https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key#result.

      Parameters

      • key_name: string

        The key name of the key.

      Returns boolean

      True, in the frame the key is pressed down.

      if (input_key_down('a')) {
      // 'a' key is pressed down
      }