# KeyCharacterMap.KeyData

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  
Deprecated in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# KeyData

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/KeyCharacterMap.KeyData "View this page in Java")  

```
open class KeyData
```

|---|------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                               ||
| ↳ | [android.view.KeyCharacterMap.KeyData](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.KeyData#) |

*** ** * ** ***

| **This class was deprecated in API level 11.**
|
| instead use[KeyCharacterMap.getDisplayLabel(int)](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#getDisplayLabel(kotlin.Int)),[KeyCharacterMap.getNumber(int)](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#getNumber(kotlin.Int))and[KeyCharacterMap.get(int, int)](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#get(kotlin.Int,%20kotlin.Int)).

Describes the character mappings associated with a key.

## Summary

|                                                                                                     Constants                                                                                                      ||
|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [META_LENGTH](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.KeyData#META_LENGTH:kotlin.Int) <br /> |

|                                                  Public constructors                                                   ||
|---------------------------------------------------------------------------------------------------------------------|---|
| [KeyData](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.KeyData#KeyData())`()` <br /> |

|                                                                                                                                                                                                                                                                                                                                  Properties                                                                                                                                                                                                                                                                                                                                  ||
|------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html)             | [displayLabel](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.KeyData#displayLabel:kotlin.Char) The display label (see[getDisplayLabel](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#getDisplayLabel(kotlin.Int))).                                                                                                                                                                                                                                                                                                    |
| [CharArray](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char-array/index.html)! | [meta](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.KeyData#meta:kotlin.CharArray) The character that will be generated in various meta states (the same ones used for[get](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#get(kotlin.Int,%20kotlin.Int))and defined as[KeyEvent.META_SHIFT_ON](https://developer.android.com/reference/kotlin/android/view/KeyEvent#META_SHIFT_ON:kotlin.Int)and[KeyEvent.META_ALT_ON](https://developer.android.com/reference/kotlin/android/view/KeyEvent#META_ALT_ON:kotlin.Int)). |
| [Char](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-char/index.html)             | [number](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap.KeyData#number:kotlin.Char) The "number" value (see[getNumber](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#getNumber(kotlin.Int))).                                                                                                                                                                                                                                                                                                                           |

## Constants

### META_LENGTH

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
static val META_LENGTH: Int
```

**Deprecated:** *Deprecated in Java.*  

    Value: 4

## Public constructors

### KeyData

```
KeyData()
```

## Properties

### displayLabel

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var displayLabel: Char
```

**Deprecated:** *Deprecated in Java.*

The display label (see[getDisplayLabel](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#getDisplayLabel(kotlin.Int))).  

### meta

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var meta: CharArray!
```

**Deprecated:** *Deprecated in Java.*

The character that will be generated in various meta states (the same ones used for[get](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#get(kotlin.Int,%20kotlin.Int))and defined as[KeyEvent.META_SHIFT_ON](https://developer.android.com/reference/kotlin/android/view/KeyEvent#META_SHIFT_ON:kotlin.Int)and[KeyEvent.META_ALT_ON](https://developer.android.com/reference/kotlin/android/view/KeyEvent#META_ALT_ON:kotlin.Int)).

| Index |    Value     |
|-------|--------------|
| 0     | no modifiers |
| 1     | caps         |
| 2     | alt          |
| 3     | caps + alt   |

<br />

### number

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
var number: Char
```

**Deprecated:** *Deprecated in Java.*

The "number" value (see[getNumber](https://developer.android.com/reference/kotlin/android/view/KeyCharacterMap#getNumber(kotlin.Int))).