Class TextInputManipulator

Class Hierarchy

The text input manipulator handles key gestures used with TextBox nodes to move the cursor, select text, and delete text, and provides the basics of text editing capabilities in Kanzi. For example, you can enable the application user to:

  • Insert, replace, and erase text.
  • Manipulate the cursor.
  • Select text.

To move the cursor in a TextBox node the text input manipulator uses the Left Arrow, Right Arrow, Home, and End navigation keys, and the Control key modifier.

To modify the text selection in a TextBox node the text input manipulator uses the Left Arrow, Right Arrow, Home, and End navigation keys, and the Control and Shift key modifiers.

The text input manipulator recognizes only one navigation key gesture at a time. When Kanzi recognizes a key-pressed gesture for a navigation key, the manipulator grabs the key input and blocks any key input until Kanzi recognizes the key-released gesture for the pressed navigation key.

When the user presses a navigation key, Kanzi dispatches a message dedicated to that navigation key. When the user holds down a key, Kanzi uses the key-hold and key-repeat gestures to create the text cursor or text selection cursor messages for each navigation key. To configure the key-hold and key-repeat gestures, use the setKeyHoldTimeout() and setKeyRepeatInterval() methods. When focus changes, Kanzi cancels the manipulator, but the cancellation does not result in a separate text cursor or text selection cursor cancel message. You can cancel a key-pressed gesture for a text cursor or text selection navigation key with the cancel() method.

Since Kanzi 3.9.0

Inherits properties and message types from TextInputManipulatorMetadata.

Synopsis

Methods
create()

Creates a TextInputManipulator instance

TextInputManipulator.TextInputManipulator:create(name)

Creates a TextInputManipulator instance.

Parameters
name (string)

The name of the input manipulator.