Struct TextEvent
A single character text input event.
Namespace: UnityEngine.InputSystem.LowLevel
Syntax
public struct TextEvent : IInputEventTypeInfo
Remarks
Text input does not fit the control-based input model well and thus is represented as its own form of input. A device that is capable of receiving text input (such as Keyboard) receives text input events and should implement ITextInputReceiver in order for the input system to be able to relay these events to the device.
Fields
baseEvent
Declaration
public InputEvent baseEvent
Field Value
Type | Description |
---|---|
InputEvent |
character
Character in UTF-32 encoding.
Declaration
public int character
Field Value
Type | Description |
---|---|
Int32 |
Type
Declaration
public const int Type = 1413830740
Field Value
Type | Description |
---|---|
Int32 |
Properties
typeStatic
Declaration
public readonly FourCC typeStatic { get; }
Property Value
Type | Description |
---|---|
FourCC |
Implements
Methods
Create(Int32, Char, Double)
Declaration
public static TextEvent Create(int deviceId, char character, double time = -1)
Parameters
Type | Name | Description |
---|---|---|
Int32 | deviceId | |
Char | character | |
Double | time |
Returns
Type | Description |
---|---|
TextEvent |
Create(Int32, Int32, Double)
Declaration
public static TextEvent Create(int deviceId, int character, double time = -1)
Parameters
Type | Name | Description |
---|---|---|
Int32 | deviceId | |
Int32 | character | |
Double | time |
Returns
Type | Description |
---|---|
TextEvent |
From(InputEventPtr)
Declaration
public static TextEvent*From(InputEventPtr eventPtr)
Parameters
Type | Name | Description |
---|---|---|
InputEventPtr | eventPtr |
Returns
Type | Description |
---|---|
TextEvent* |