docs.unity3d.com
    Show / Hide Table of Contents

    Class KeyboardFocusController

    A Manipulator that adds a class to the target element when it is keyboard focused. This is useful for accessibility purposes.

    Inheritance
    Object
    Manipulator
    KeyboardFocusController
    Inherited Members
    Manipulator.target
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.AppUI.UI
    Syntax
    public class KeyboardFocusController : Manipulator, IManipulator

    Constructors

    KeyboardFocusController(EventCallback<FocusInEvent>, EventCallback<FocusInEvent>, EventCallback<FocusOutEvent>)

    Construct a KeyboardFocusController.

    Declaration
    public KeyboardFocusController(EventCallback<FocusInEvent> keyboardFocusInEventCallback = null, EventCallback<FocusInEvent> otherFocusInEventCallback = null, EventCallback<FocusOutEvent> focusedOutCallback = null)
    Parameters
    Type Name Description
    UnityEngine.UIElements.EventCallback<FocusInEvent> keyboardFocusInEventCallback

    A callback invoked when the target element receives keyboard focus.

    UnityEngine.UIElements.EventCallback<FocusInEvent> otherFocusInEventCallback

    A callback invoked when the target element receives focus from another source.

    UnityEngine.UIElements.EventCallback<FocusOutEvent> focusedOutCallback

    A callback invoked when the target element loses focus.

    Properties

    keyboardFocused

    Check if the target element is keyboard focused.

    Declaration
    public bool keyboardFocused { get; }
    Property Value
    Type Description
    Boolean

    Methods

    RegisterCallbacksOnTarget()

    Called to register event callbacks on the target element.

    Declaration
    protected override void RegisterCallbacksOnTarget()
    Overrides
    Manipulator.RegisterCallbacksOnTarget()

    UnregisterCallbacksFromTarget()

    Called to unregister event callbacks from the target element.

    Declaration
    protected override void UnregisterCallbacksFromTarget()
    Overrides
    Manipulator.UnregisterCallbacksFromTarget()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023