Class KeyManipulator

Class Hierarchy

KeyManipulator class is a key input manipulator that detects key gestures. Kanzi recognizes a key gesture when it receives an event with a key code and an optional key modifier. When Kanzi recognizes a key gesture, an input manipulator:

  • Grabs the gesture.
  • Enters the StateBegin state.
  • Dispatches to an attached node the KeyPressedMessage with the logical key value and the pressed key modifiers.

The input manipulator that grabs a key gesture continues to stay in the StateBegin state until it receives a key up event with a logical key value, or a key modifier that forms a key gesture.

The key input manipulators are exclusive input manipulators. To handle different key gestures, you can add multiple key manipulators. The key press order matters. Pressing Left Control first and then Left Alt does not result in the same key gesture as pressing first Left Alt, then Left Control.

Since Kanzi 3.8.0

Inherits properties and message types from KeyManipulatorMetadata.

Synopsis

Methods
create()

Creates a KeyManipulator instance

KeyManipulator.KeyManipulator:create(anonymous)

Creates a KeyManipulator instance.