---
title: "modes(_:)"
framework: InputMethodKit
role: symbol
role_heading: Instance Method
platforms: [macOS 10.5+]
path: "inputmethodkit/imkstatesetting/modes(_:)"
---

# modes(_:)

Returns the modes dictionary associated with the input method.

## Declaration

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

## Parameters

- `sender`: The client object requesting the modes dictionary.

## Return Value

Return Value The modes dictionary associated with the input method.

## Discussion

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.
