How to use TouchScreenKeyboardType with the new 4.6+ UI System?

I can’t seem to find any relevant examples. (I’m using JavaScript FWIW.)

I’m assuming it’s a property specific to a given InputField component, or some other UI component, but my best guess fails:

var myField : UI.InputField;

...

myField.TouchScreenKeyboard.TouchScreenKeyboardType = TouchScreenKeyboardType.ASCIICapable;

I can control myField successfully in many ways, but this line just generates BCE0019: ‘TouchScreenKeyboard’ is not a member of ‘UnityEngine.UI.InputField’.

(Ultimate goal: prevent Emoji entry. I’m assuming that’s what “ASCIICapable” does.)

TIA

TouchScreenKeyboard is a class. So the way you try to use it makes no sense at all ^^.

InputField has a property called keyboardType which allows you to specify which keyboard type it should use. So you can do:

myField.keyboardType = TouchScreenKeyboardType.ASCIICapable;