<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "InputMethodKit",
  "identifier" : "/documentation/InputMethodKit/IMKCandidates/selectionKeys()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "InputMethodKit"
    ],
    "preciseIdentifier" : "c:objc(cs)IMKCandidates(im)selectionKeys"
  },
  "title" : "selectionKeys()"
}
-->

# selectionKeys()

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

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

## Return Value

The array of `NSNumber` objects.

## 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.

---

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)