---
title: selectionKeys()
framework: InputMethodKit
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: inputmethodkit/imkcandidates/selectionkeys()
---

# selectionKeys()

Returns an array of NSNumber objects where each NSNumber object represents a virtual key code.

## Declaration

```swift
func selectionKeys() -> [Any]!
```

## Return Value

Return Value The array of NSNumber objects.

## Discussion

Discussion Selection keys  are keys that can be used to select one of the candidates. They are displayed next to the candidate that will be selected when the user types that key.

## See Also

### Managing Selection Keys

- [setSelectionKeys(_:)](inputmethodkit/imkcandidates/setselectionkeys(_:).md)
- [setSelectionKeysKeylayout(_:)](inputmethodkit/imkcandidates/setselectionkeyskeylayout(_:).md)
- [selectionKeysKeylayout()](inputmethodkit/imkcandidates/selectionkeyskeylayout().md)
