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

# performMnemonic:

Handle a mnemonic.

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

## Parameters

`string`

A string containing mnemonic character code or codes.

## Discussion

Orverride to respond to mnemonics. If the character code or codes in s`tring` match the receiver’s mnemonic, the receiver should perform the mnemonic and return <doc://com.apple.documentation/documentation/Swift/true>. The default implementation does nothing and returns <doc://com.apple.documentation/documentation/Swift/false>. Mnemonics are not supported in macOS.

## See Also

[`- (BOOL) performMnemonic:(NSString *) string;`](/documentation/AppKit/NSView/performMnemonic:)

Implemented by subclasses to respond to mnemonics.



---

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)