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

# modes(_:)

Returns the modes dictionary associated with the input method.

```
func modes(_ sender: Any!) -> [AnyHashable : Any]!
```

## Parameters

`sender`

The client object requesting the modes dictionary.

## Return Value

The modes dictionary associated with the input method.

## Discussion

Typically a client object calls this method to to build the text input menu. By calling the input method rather than reading the modes from the `Info.plist` file, the input method can dynamically modify the modes supported.

---

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)