Text update from the input method (text and selection range).
Lens Scripting Version 364
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); Copy
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);
The end of the selection range inside the updated text
0 Copy
0
The start of the selection range inside the updated text (0 based index)
The updated text coming from the input method.
"" Copy
""
Text update from the input method (text and selection range).
Since
Lens Scripting Version 364
Snap OS
Example