- Home /
Question by
KnightRiderGuy · Jan 30, 2016 at 07:20 PM ·
c#keyboardinputfieldvirtualkeycode
Help with Virtual Keyboard
I'm trying to make a virtual keyboard but I'm having difficulty with some of the odd keys like space bar, delete and some of the other odd one. I have this simple script I'm using to read the key inputs into a UI input field.
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class KeyBoard : MonoBehaviour {
public InputField inputField;
void Start ()
{
inputField = GameObject.Find ("InputField").GetComponent<InputField> ();
}
public void readButton (string c){
inputField.text += c;
}
public void spaceBar(){
Input.GetKey("Space" + inputField.text);
}
}
Comment
Your answer
Follow this Question
Related Questions
Key not recognized 2 Answers
Force UI Input Field Character limit with C Sharp 0 Answers
How to get Key with KeyCode.Question? 1 Answer
i can assign all keys but the shift any ideas 4 Answers
Microsoft surface 3 virtual keyboard c# 0 Answers