mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Struct KeyBinding

    Identifier of a key combination or mouse button for generic input binding.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Microsoft.MixedReality.Toolkit.Input
    Assembly: cs.temp.dll.dll
    Syntax
    [Serializable]
    [Serializable]
    public struct KeyBinding
    Remarks

    This encodes either a KeyCode with optional modifiers or a mouse button index.

    Properties

    BindingType

    Type of input this binding maps to.

    Declaration
    public KeyBinding.KeyType BindingType { get; }
    Property Value
    Type Description
    KeyBinding.KeyType

    BindingType

    Type of input this binding maps to.

    Declaration
    public KeyBinding.KeyType BindingType { get; }
    Property Value
    Type Description
    KeyBinding.KeyType

    Methods

    FromKey(KeyCode)

    Create a binding for a keyboard key.

    Declaration
    public static KeyBinding FromKey(KeyCode keyCode)
    Parameters
    Type Name Description
    KeyCode keyCode
    Returns
    Type Description
    KeyBinding

    FromKey(KeyCode)

    Create a binding for a keyboard key.

    Declaration
    public static KeyBinding FromKey(KeyCode keyCode)
    Parameters
    Type Name Description
    KeyCode keyCode
    Returns
    Type Description
    KeyBinding

    FromMouseButton(KeyBinding.MouseButton)

    Create a binding for a mouse button.

    Declaration
    public static KeyBinding FromMouseButton(KeyBinding.MouseButton mouseButton)
    Parameters
    Type Name Description
    KeyBinding.MouseButton mouseButton
    Returns
    Type Description
    KeyBinding

    FromMouseButton(KeyBinding.MouseButton)

    Create a binding for a mouse button.

    Declaration
    public static KeyBinding FromMouseButton(KeyBinding.MouseButton mouseButton)
    Parameters
    Type Name Description
    KeyBinding.MouseButton mouseButton
    Returns
    Type Description
    KeyBinding

    FromMouseButton(Int32)

    Create a binding for a mouse button.

    Declaration
    public static KeyBinding FromMouseButton(int mouseButton)
    Parameters
    Type Name Description
    Int32 mouseButton
    Returns
    Type Description
    KeyBinding

    FromMouseButton(Int32)

    Create a binding for a mouse button.

    Declaration
    public static KeyBinding FromMouseButton(int mouseButton)
    Parameters
    Type Name Description
    Int32 mouseButton
    Returns
    Type Description
    KeyBinding

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()

    TryGetKeyCode(out KeyCode)

    Try to convert the binding to a KeyCode.

    Declaration
    public bool TryGetKeyCode(out KeyCode keyCode)
    Parameters
    Type Name Description
    KeyCode keyCode
    Returns
    Type Description
    Boolean

    True if the binding is a keyboard key

    TryGetKeyCode(out KeyCode)

    Try to convert the binding to a KeyCode.

    Declaration
    public bool TryGetKeyCode(out KeyCode keyCode)
    Parameters
    Type Name Description
    KeyCode keyCode
    Returns
    Type Description
    Boolean

    True if the binding is a keyboard key

    TryGetMouseButton(out KeyBinding.MouseButton)

    Try to convert the binding to a mouse button.

    Declaration
    public bool TryGetMouseButton(out KeyBinding.MouseButton mouseButton)
    Parameters
    Type Name Description
    KeyBinding.MouseButton mouseButton
    Returns
    Type Description
    Boolean

    True if the binding is a mouse button

    TryGetMouseButton(out KeyBinding.MouseButton)

    Try to convert the binding to a mouse button.

    Declaration
    public bool TryGetMouseButton(out KeyBinding.MouseButton mouseButton)
    Parameters
    Type Name Description
    KeyBinding.MouseButton mouseButton
    Returns
    Type Description
    Boolean

    True if the binding is a mouse button

    TryGetMouseButton(out Int32)

    Try to convert the binding to a mouse button.

    Declaration
    public bool TryGetMouseButton(out int mouseButton)
    Parameters
    Type Name Description
    Int32 mouseButton
    Returns
    Type Description
    Boolean

    True if the binding is a mouse button

    TryGetMouseButton(out Int32)

    Try to convert the binding to a mouse button.

    Declaration
    public bool TryGetMouseButton(out int mouseButton)
    Parameters
    Type Name Description
    Int32 mouseButton
    Returns
    Type Description
    Boolean

    True if the binding is a mouse button

    Unbound()

    Create a default empty binding.

    Declaration
    public static KeyBinding Unbound()
    Returns
    Type Description
    KeyBinding

    Unbound()

    Create a default empty binding.

    Declaration
    public static KeyBinding Unbound()
    Returns
    Type Description
    KeyBinding
    In This Article
    • Properties
      • BindingType
      • BindingType
    • Methods
      • FromKey(KeyCode)
      • FromKey(KeyCode)
      • FromMouseButton(KeyBinding.MouseButton)
      • FromMouseButton(KeyBinding.MouseButton)
      • FromMouseButton(Int32)
      • FromMouseButton(Int32)
      • ToString()
      • ToString()
      • TryGetKeyCode(out KeyCode)
      • TryGetKeyCode(out KeyCode)
      • TryGetMouseButton(out KeyBinding.MouseButton)
      • TryGetMouseButton(out KeyBinding.MouseButton)
      • TryGetMouseButton(out Int32)
      • TryGetMouseButton(out Int32)
      • Unbound()
      • Unbound()
    Back to top Generated by DocFX