<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIKeyCommand/allowsAutomaticMirroring",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIKeyCommand(py)allowsAutomaticMirroring"
  },
  "title" : "allowsAutomaticMirroring"
}
-->

# allowsAutomaticMirroring

A Boolean value that determines whether the system automatically swaps input strings for some keyboard shortcuts when the interface direction changes.

```
var allowsAutomaticMirroring: Bool { get set }
```

## Discussion

When a key command represents a direction-related action, it’s common to specify an input string that conveys that direction. For example, Safari uses Command-[ to go back to the previous page, and Command-] to go forward to the next page. Because directions are different in left-to-right and right-to-left interfaces, this property lets the system swap some input strings to match the current language direction.

When the value of this property is <doc://com.apple.documentation/documentation/Swift/true>, iOS 15 and later automatically swaps input strings that contain brackets `[]`, braces `{}`, parenthesis `()`, angle brackets `<>`, or arrow keys when the interface directionality changes. This behavior eliminates the need for you to create different key commands for left-to-right and right-to-left interfaces. Set this property to <doc://com.apple.documentation/documentation/Swift/false> if you already change this item’s shortcut to support both left-to-right and right-to-left interfaces. You might also set it to <doc://com.apple.documentation/documentation/Swift/false> to keep the same shortcut regardless of the interface’s directionality.

The default value of this property is <doc://com.apple.documentation/documentation/Swift/true>. However, if you set the [`allowsAutomaticLocalization`](/documentation/UIKit/UIKeyCommand/allowsAutomaticLocalization) property to <doc://com.apple.documentation/documentation/Swift/false>, the system disables this feature regardless of the property’s value.

---

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)