Stay organized with collections
Save and categorize content based on your preferences.
KeyData
open class KeyData
Describes the character mappings associated with a key.
Summary
Constants
static val META_LENGTH: Int
Deprecated: Deprecated in Java.
Value: 4
Public constructors
Properties
displayLabel
var displayLabel: Char
Deprecated: Deprecated in Java.
The display label (see getDisplayLabel
).
number
var number: Char
Deprecated: Deprecated in Java.
The "number" value (see getNumber
).
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# KeyCharacterMap.KeyData\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nKeyData\n=======\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/KeyCharacterMap.KeyData \"View this page in Java\") \n\n```\nopen class KeyData\n```\n\n|---|-------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.view.KeyCharacterMap.KeyData](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 11.**\n|\n| instead use [KeyCharacterMap.getDisplayLabel(int)](/reference/kotlin/android/view/KeyCharacterMap#getDisplayLabel(kotlin.Int)), [KeyCharacterMap.getNumber(int)](/reference/kotlin/android/view/KeyCharacterMap#getNumber(kotlin.Int)) and [KeyCharacterMap.get(int, int)](/reference/kotlin/android/view/KeyCharacterMap#get(kotlin.Int,%20kotlin.Int)).\n\nDescribes the character mappings associated with a key.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [META_LENGTH](#META_LENGTH:kotlin.Int) \u003cbr /\u003e |\n\n| Public constructors ||\n|----------------------------------|---|\n| [KeyData](#KeyData())`()` \u003cbr /\u003e |\n\n| Properties ||\n|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html) | [displayLabel](#displayLabel:kotlin.Char) The display label (see [getDisplayLabel](/reference/kotlin/android/view/KeyCharacterMap#getDisplayLabel(kotlin.Int))). |\n| [CharArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-array/index.html)! | [meta](#meta:kotlin.CharArray) The character that will be generated in various meta states (the same ones used for [get](/reference/kotlin/android/view/KeyCharacterMap#get(kotlin.Int,%20kotlin.Int)) and defined as [KeyEvent.META_SHIFT_ON](/reference/kotlin/android/view/KeyEvent#META_SHIFT_ON:kotlin.Int) and [KeyEvent.META_ALT_ON](/reference/kotlin/android/view/KeyEvent#META_ALT_ON:kotlin.Int)). |\n| [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html) | [number](#number:kotlin.Char) The \"number\" value (see [getNumber](/reference/kotlin/android/view/KeyCharacterMap#getNumber(kotlin.Int))). |\n\nConstants\n---------\n\n### META_LENGTH\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val META_LENGTH: Int\n```\n\n**Deprecated:** *Deprecated in Java.* \n\n Value: 4\n\nPublic constructors\n-------------------\n\n### KeyData\n\n```\nKeyData()\n```\n\nProperties\n----------\n\n### displayLabel\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar displayLabel: Char\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nThe display label (see [getDisplayLabel](/reference/kotlin/android/view/KeyCharacterMap#getDisplayLabel(kotlin.Int))). \n\n### meta\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar meta: CharArray!\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nThe character that will be generated in various meta states (the same ones used for [get](/reference/kotlin/android/view/KeyCharacterMap#get(kotlin.Int,%20kotlin.Int)) and defined as [KeyEvent.META_SHIFT_ON](/reference/kotlin/android/view/KeyEvent#META_SHIFT_ON:kotlin.Int) and [KeyEvent.META_ALT_ON](/reference/kotlin/android/view/KeyEvent#META_ALT_ON:kotlin.Int)).\n\n| Index | Value |\n|-------|--------------|\n| 0 | no modifiers |\n| 1 | caps |\n| 2 | alt |\n| 3 | caps + alt |\n\n\u003cbr /\u003e\n\n### number\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nvar number: Char\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nThe \"number\" value (see [getNumber](/reference/kotlin/android/view/KeyCharacterMap#getNumber(kotlin.Int)))."]]