TextInputSystem.TextUpdate
ClassText update from the input method (text and selection range).
- Snapchat: not supported
- SPECS: fully supported
- Camera Kit Web: not supported
- Camera Kit Mobile: not supported
- SnapchatNot supported — Available on SPECS only
- SPECSFully supported
- Camera Kit WebNot supported — Available on SPECS only
- Camera Kit MobileNot supported — Available on SPECS only
Since Lens Scripting v365
Text update from the input method (text and selection range).
Index
Properties
Methods
Example
var options = new TextInputSystem.KeyboardOptions();
global.textInputSystem.requestKeyboard(options);
var update = new TextInputSystem.TextUpdate();
update.text = "Hello, world!";
update.selectionStart = 0;
update.selectionEnd = 10;
global.textInputSystem.updateText(update);
Constructors
Constructor
new TextUpdate():
TextUpdate
Returns
TextUpdate
Properties
selectionEnd
selectionEnd:
number
SPECS
The end of the selection range inside the updated text
Since
Lens Scripting Version 365
Default Value
0
@snapOS
selectionStart
selectionStart:
number
SPECS
The start of the selection range inside the updated text (0 based index)
Since
Lens Scripting Version 365
Default Value
0
@snapOS
text
text:
string
SPECS
The updated text coming from the input method.
Since
Lens Scripting Version 365
Default Value
""
@snapOS
Methods
getTypeName()
staticgetTypeName():TypeName<TextUpdate>
SPECS
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<TextUpdate>
Since
Lens Scripting Version 365