<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.8.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSView/performMnemonic:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSView(im)performMnemonic:"
  },
  "title" : "performMnemonic:"
}
-->

# performMnemonic:

Implemented by subclasses to respond to mnemonics.

```
- (BOOL) performMnemonic:(NSString *) string;
```

## Parameters

`string`

A string representing the mnemonic to handle.

## Discussion

If the view’s mnemonic is the same as the characters of the string `aString`, the view should take the appropriate action and return <doc://com.apple.documentation/documentation/Swift/true>. Otherwise, it should return the result of invoking `super`‘s implementation. The default implementation of this method simply passes the message down the view hierarchy (from superviews to subviews) and returns <doc://com.apple.documentation/documentation/Swift/false> if none of the view’s subviews responds <doc://com.apple.documentation/documentation/Swift/true>. Mnemonics are not supported in macOS.

## See Also

[`func performKeyEquivalent(with: NSEvent) -> Bool`](/documentation/AppKit/NSView/performKeyEquivalent(with:))

Implemented by subclasses to respond to key equivalents (also known as keyboard shortcuts).



---

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)