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

# isDirectionInvertedFromDevice

A Boolean value that indicates whether the user has changed the device inversion.

```
var isDirectionInvertedFromDevice: Bool { get }
```

## Discussion

This property is set to <doc://com.apple.documentation/documentation/Swift/true> if the direction is inverted; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

This property is valid for `NSEventScrollWheel` and [`NSEvent.EventType.swipe`](/documentation/AppKit/NSEvent/EventType/swipe) events. The user may choose to change the scrolling behavior such that it feels like they are moving the content instead of the scroll bar.

To accomplish this, [`deltaX`](/documentation/AppKit/NSEvent/deltaX) and [`deltaY`](/documentation/AppKit/NSEvent/deltaY) and [`scrollingDeltaX`](/documentation/AppKit/NSEvent/scrollingDeltaX) and [`scrollingDeltaY`](/documentation/AppKit/NSEvent/scrollingDeltaY) values are automatically inverted for NSEventScrollWheel events according to the user’s preferences.

The direction of fluid swipes matches the direction of scrolling and as such for NSEventTypeSwipe events gestureAmount is inverted. However, for some uses of NSEventScrollWheel and NSEventTypeSwipe events, the behavior should not respect the user preference. This property allows you to determine when the event has been inverted and compensate by multiplying by `-1` if needed.

---

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)