---
title: buttons
framework: gamecontroller
role: symbol
role_heading: Instance Property
path: gamecontroller/gcdevicephysicalinputstate/buttons-2ovae
---

# buttons

The device’s buttons as key-value pairs for lookup by name.

## Declaration

```swift
var buttons: GCPhysicalInputElementCollection<any GCButtonElement> { get }
```

## See Also

### Accessing elements

- [elements](gamecontroller/gcdevicephysicalinputstate/elements-46hgy.md)
- [axes](gamecontroller/gcdevicephysicalinputstate/axes-5u1xr.md)
- [dpads](gamecontroller/gcdevicephysicalinputstate/dpads-7b4o3.md)
- [switches](gamecontroller/gcdevicephysicalinputstate/switches-6dcny.md)
- [subscript(_:)](gamecontroller/gcdevicephysicalinputstate/subscript(_:).md)
