---
title: "addShortcut(forText:from:)"
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: "browserenginekit/betextinteraction/addshortcut(fortext:from:)"
---

# addShortcut(forText:from:)

Presents UI for a person to add a text-replacement shortcut to the keyboard dictionary.

## Declaration

```swift
func addShortcut(forText text: String, from presentationRect: CGRect)
```

## See Also

### Text replacements

- [showReplacements(forText:)](browserenginekit/betextinteraction/showreplacements(fortext:).md)
