Simulate Arrow Key Press with a GUI Texture?

I have a game I’m trying to make into an app. It uses a first person controller, so I need to simulate an arrow key press (for jumping and stuff) when the person taps a GUI. How is this done? Is there an easier way? Thanks

Have the GUI call the same function that’s called when the arrow key is pressed.

Quick example:

function Update () {

    if(Input.GetKeyDown(KeyCode.Space)) {
        MakePlayerJump();
    }
}

function OnMouseDown () {
    MakePlayerJump();
}

function MakePlayerJump () {
    //Add your code to make the player jump
}