<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILexiconEntry",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UILexiconEntry"
  },
  "title" : "UILexiconEntry"
}
-->

# UILexiconEntry

A read-only term pair, available within a lexicon object, for a custom keyboard.

```
@MainActor class UILexiconEntry
```

## Overview

You can employ a lexicon entry by matching user input against the entry’s [`userInput`](/documentation/UIKit/UILexiconEntry/userInput) value, and then inserting into the current text input object the corresponding [`documentText`](/documentation/UIKit/UILexiconEntry/documentText) value. For example, if the user typed the string “iphone”, the lexicon entry with that exact, case-sensitive string in the [`userInput`](/documentation/UIKit/UILexiconEntry/userInput) property has the string “iPhone” in the corresponding [`documentText`](/documentation/UIKit/UILexiconEntry/documentText) property.

In some cases, the [`documentText`](/documentation/UIKit/UILexiconEntry/documentText) string is in a different text script than the [`userInput`](/documentation/UIKit/UILexiconEntry/userInput) string.

For information on custom keyboards, which are based on the [`UIInputViewController`](/documentation/UIKit/UIInputViewController) class, see [Creating a custom keyboard](/documentation/UIKit/creating-a-custom-keyboard).

## Topics

### Accessing a lexicon entry

[`documentText`](/documentation/UIKit/UILexiconEntry/documentText)

Text to be inserted into a text input object by a custom keyboard, corresponding to the user input value in the same lexicon entry.

[`userInput`](/documentation/UIKit/UILexiconEntry/userInput)

Text to match, during user input, to provide appropriate output to a text document from the document text value in the same lexicon entry.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)