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

# menu()

Returns a menu of commands that are specific to an input method.

## Declaration

```swift
func menu() -> NSMenu!
```

## Return Value

Return Value The menu object.

## Discussion

Discussion This method is called whenever the menu needs to be drawn so that an input method can update the menu to reflect the current state.

## See Also

### Working with Custom Commands

- [doCommand(by:command:)](inputmethodkit/imkinputcontroller/docommand(by:command:).md)
