---
title: GCControllerButtonInput
framework: gamecontroller
role: symbol
role_heading: Class
path: gamecontroller/gccontrollerbuttoninput
---

# GCControllerButtonInput

A control element that represents a button touch or press.

## Declaration

```swift
class GCControllerButtonInput
```

## Overview

Overview A GCControllerButtonInput object represents a button on a controller that can report either analog or digital values.

## Topics

### Accessing input values

- [isTouched](gamecontroller/gccontrollerbuttoninput/istouched.md)
- [isPressed](gamecontroller/gccontrollerbuttoninput/ispressed.md)
- [value](gamecontroller/gccontrollerbuttoninput/value.md)

### Getting change information

- [touchedChangedHandler](gamecontroller/gccontrollerbuttoninput/touchedchangedhandler.md)
- [GCControllerButtonTouchedChangedHandler](gamecontroller/gccontrollerbuttontouchedchangedhandler.md)
- [pressedChangedHandler](gamecontroller/gccontrollerbuttoninput/pressedchangedhandler.md)
- [valueChangedHandler](gamecontroller/gccontrollerbuttoninput/valuechangedhandler.md)
- [GCControllerButtonValueChangedHandler](gamecontroller/gccontrollerbuttonvaluechangedhandler.md)

### Setting snapshot values

- [setValue(_:)](gamecontroller/gccontrollerbuttoninput/setvalue(_:).md)

## Relationships

### Inherits From

- [GCControllerElement](gamecontroller/gccontrollerelement.md)

### Inherited By

- [GCDualSenseAdaptiveTrigger](gamecontroller/gcdualsenseadaptivetrigger.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Accessing controller elements

- [GCControllerElement](gamecontroller/gccontrollerelement.md)
- [GCControllerAxisInput](gamecontroller/gccontrolleraxisinput.md)
- [GCControllerTouchpad](gamecontroller/gccontrollertouchpad.md)
- [GCControllerDirectionPad](gamecontroller/gccontrollerdirectionpad.md)
- [GCDeviceCursor](gamecontroller/gcdevicecursor.md)
- [GCDualSenseAdaptiveTrigger](gamecontroller/gcdualsenseadaptivetrigger.md)
