<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCPhysicalInputElementCollection-swift.struct/subscript(_:)-3womp",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Game Controller",
      "GameController"
    ],
    "preciseIdentifier" : "s:14GameController32GCPhysicalInputElementCollectionVy08PhysicaldE0Qyd__Sgqd__cAA0cdE9TypedNameRd__luip"
  },
  "title" : "subscript(_:)"
}
-->

# subscript(_:)

Accesses the collection’s elements using the element’s name.

```
subscript<Name>(elementName: Name) -> Name.PhysicalInputElement? where Name : GCPhysicalInputElementTypedName { get }
```

---

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)