---
title: "performMnemonic:"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsresponder/performmnemonic:"
---

# performMnemonic:

Handle a mnemonic.

## Declaration

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

## Parameters

- `string`: A string containing mnemonic character code or codes.

## Discussion

Discussion Orverride to respond to mnemonics. If the character code or codes in string match the receiver’s mnemonic, the receiver should perform the mnemonic and return true. The default implementation does nothing and returns false. Mnemonics are not supported in macOS.

## See Also

### Related Documentation

- [performMnemonic:](appkit/nsview/performmnemonic:.md)

### Responding to Key Events

- [keyDown(with:)](appkit/nsresponder/keydown(with:).md)
- [keyUp(with:)](appkit/nsresponder/keyup(with:).md)
- [interpretKeyEvents(_:)](appkit/nsresponder/interpretkeyevents(_:).md)
- [performKeyEquivalent(with:)](appkit/nsresponder/performkeyequivalent(with:).md)
- [flushBufferedKeyEvents()](appkit/nsresponder/flushbufferedkeyevents().md)
