<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSEvent/charactersIgnoringModifiers",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSEvent(py)charactersIgnoringModifiers"
  },
  "title" : "charactersIgnoringModifiers"
}
-->

# charactersIgnoringModifiers

The characters generated by a key event as if no modifier key (except for Shift) applies.

```
var charactersIgnoringModifiers: String? { get }
```

## Discussion

Raises an `NSInternalInconsistencyException` if accessed on a non-key event.

This property is set to the non-modifier key character pressed for dead keys, such as Option-e. For example, Option-e (no shift key) returns an “e” for this method, whereas the [`characters`](/documentation/AppKit/NSEvent/characters) property returns an empty string.

This property is useful for determining “basic” key values in a hardware-independent manner, enabling such features as keyboard equivalents defined in terms of modifier keys plus character keys. For example, to determine if the user typed Alt-S, you don’t have to know whether Alt-S generates a German double ess, an integral sign, or a section symbol. You simply examine the string contained by this property along with the event’s modifier flags, checking for “s” and `NSAlternateKeyMask`.

For a list of constants corresponding to commonly-used Unicode characters, see [`NSText`](/documentation/AppKit/NSText).

## See Also

[`keyEvent(with:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:)`](/documentation/AppKit/NSEvent/keyEvent(with:location:modifierFlags:timestamp:windowNumber:context:characters:charactersIgnoringModifiers:isARepeat:keyCode:))

Creates and returns a new event object that describes a key event.

[`modifierFlags`](/documentation/AppKit/NSEvent/modifierFlags-swift.property)

An integer bit field that indicates the pressed modifier keys.



---

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)