docs.unity3d.com
Search Results for

    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
    Implements
    IManipulator
    Inherited Members
    Manipulator.target
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    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
    EventCallback<FocusInEvent> keyboardFocusInEventCallback

    A callback invoked when the target element receives keyboard focus.

    EventCallback<FocusInEvent> otherFocusInEventCallback

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

    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
    bool

    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()

    Implements

    IManipulator
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)