Struct KeyboardState | Input System | 1.0.2
docs.unity.cn
    Show / Hide Table of Contents

    Struct KeyboardState

    Default state layout for keyboards.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    public struct KeyboardState : IInputStateTypeInfo

    Constructors

    KeyboardState(Key[])

    Declaration
    public KeyboardState(params Key[] pressedKeys)
    Parameters
    Type Name Description
    Key[] pressedKeys

    Fields

    keys

    Declaration
    public byte *keys
    Field Value
    Type Description
    Byte*

    Properties

    format

    Declaration
    public FourCC format { get; }
    Property Value
    Type Description
    FourCC
    Implements
    IInputStateTypeInfo.format

    Format

    Memory format tag for KeybboardState.

    Declaration
    public static FourCC Format { get; }
    Property Value
    Type Description
    FourCC

    Returns "KEYS".

    See Also
    format

    Methods

    Press(Key)

    Declaration
    public void Press(Key key)
    Parameters
    Type Name Description
    Key key

    Release(Key)

    Declaration
    public void Release(Key key)
    Parameters
    Type Name Description
    Key key

    Set(Key, Boolean)

    Declaration
    public void Set(Key key, bool state)
    Parameters
    Type Name Description
    Key key
    Boolean state
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 22 January 2021