[Closed} onClick button, post preset text to InputField.

First thing: I’m new. So I’m trying to build a virtual keyboard in Unity. I’m starting with one key, and one InputField.

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class KeyboardScript : MonoBehaviour {
InputField iField;

public void onClick() {
string key = "k";
iField.text(key);
}
}

Here’s how I interpret the code I wrote:
using UnityEngine.UI allows me to reference UI GameObjects.
InputField is the name of my input field and I let the computer know it is an iField.
This code is a component of my button which is called K, and so onClick() means when button K is clicked.
Let string called key equal letter k.
Let the text inside InputField equal k.

My error says "The member ‘UnityEngine.UI.InputField.Text’ cannot be used as method or delegate.

I appreciate any advice. I have looked at the Unity manuals and other things, I just need a human’s help because I don’t know what I’m looking at.
Thanks.

Please Note:

The Teaching section is to discuss and support specific Teaching material and the Learn section of the website. For basic support please use the relevant section of the forum. Some suggestions would be:

In your case it looks like you are asking a UI related question, so I’d try the UI section:

As this topic is not specific to Teaching Material or the Learn Section of our site, I am closing this thread.

PS: It’s great that you are using Code Tags, but it would be best if you formatted your code correctly, including proper indentation, before posting.