Class KeyControl
A key on a Keyboard.
Inherited Members
Namespace: UnityEngine.InputSystem.Controls
Syntax
public class KeyControl : ButtonControl
Remarks
This is an extended button control which adds various features to account for the fact that keys have symbols associated with them which may change depending on keyboard layout as well as in combination with other keys.
Note that there is no text input associated with individual keys as text composition is highly
layout specific and does not need to be key-by-key. For general text input, see onTextInput.
To find the text displayed on a key, use
Properties
keyCode
The code used in Unity to identify the key.
Declaration
public Key keyCode { get; set; }
Property Value
Type | Description |
---|---|
Key |
Remarks
This property must be initialized by FinishSetup() of the device owning the control.
scanCode
The code that the underlying platform uses to identify the key.
Declaration
public int scanCode { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
RefreshConfiguration()
Declaration
protected override void RefreshConfiguration()