<!--
{
  "availability" : [
    "macOS: 10.12.2 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTouch/TouchTypeMask",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTouchTypeMask"
  },
  "title" : "NSTouch.TouchTypeMask"
}
-->

# NSTouch.TouchTypeMask

A bit mask identifying a direct or indirect touch type.

```
struct TouchTypeMask
```

## Topics

### Creating a Touch Type Mask

[`NSTouchTypeMaskFromType`](/documentation/AppKit/NSTouch/TouchTypeMask/init(type:))

Creates a new touch type mask from the touch type.

[`init(rawValue:)`](/documentation/AppKit/NSTouch/TouchTypeMask/init(rawValue:))

Creates a new touch type mask from the given raw value.

### Masking the Touch Types

[`NSTouchTypeMaskDirect`](/documentation/AppKit/NSTouch/TouchTypeMask/direct)

A direct touch from a user’s finger on a screen.

[`NSTouchTypeMaskIndirect`](/documentation/AppKit/NSTouch/TouchTypeMask/indirect)

An indirect touch that is not on a screen, like a digitizer touch.

## Relationships

### Conforms To

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`SetAlgebra`](/documentation/Swift/SetAlgebra)

[`ExpressibleByArrayLiteral`](/documentation/Swift/ExpressibleByArrayLiteral)

[`Equatable`](/documentation/Swift/Equatable)

[`OptionSet`](/documentation/Swift/OptionSet)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

---

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)