public void OnKeyDown(GameObject kb) { if (kb.name == "DONE") { if (canvasKeyboard != null) { canvasKeyboard.CloseKeyboard(); } } else if (kb.name == "ALT") { AltDown = !AltDown; ShiftDown = false; Refresh(); } else if (kb.name == "SHIFT") { ShiftDown = !ShiftDown; Refresh(); } else { if (canvasKeyboard != null) { string s; if (kb.name == "BACKSPACE") { s = "\x08"; } else if (kb.name == "SPACE") { s = " "; } else { s = kb.name; } canvasKeyboard.SendKeyString(s); } } }