docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Keyboard devices introduction

    The Keyboard class defines a device with a set of key controls defined by the Key enumeration.

    The location of individual keys is agnostic to keyboard layout. This means that, for example, the A key is always the key to the right of the Caps Lock key, regardless of where the active keyboard layout places the key that generates the A character, or whether the layout has a key assigned to that character.

    For a list of platforms that support keyboard devices, refer to Supported devices reference.

    The scripting API reference for the Keyboard class lists all the properties for the individual key controls. Two controls, anyKey and imeSelected, don't directly map to individual keys. anyKey is a synthetic button control which reports whether any key on the keyboard is pressed, and imeSelectedreports whether or not IME text processing is enabled.

    In This Article
    Back to top
    Copyright © 2026 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)