---
title: "annotationSelected(_:forCandidate:)"
framework: InputMethodKit
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: "inputmethodkit/imkinputcontroller/annotationselected(_:forcandidate:)"
---

# annotationSelected(_:forCandidate:)

Sends the selected candidate string and annotation string to the input controller.

## Declaration

```swift
func annotationSelected(_ annotationString: NSAttributedString!, forCandidate candidateString: NSAttributedString!)
```

## Parameters

- `annotationString`: The annotation string associated with the candidate.
- `candidateString`: The candidate string that the user moved to.

## Discussion

Discussion This method is called when the user moves to a candidate.

## See Also

### Tracking Selections

- [candidateSelectionChanged(_:)](inputmethodkit/imkinputcontroller/candidateselectionchanged(_:).md)
- [candidateSelected(_:)](inputmethodkit/imkinputcontroller/candidateselected(_:).md)
