---
title: elementValueDidChangeHandler
framework: gamecontroller
role: symbol
role_heading: Instance Property
path: gamecontroller/gcdevicephysicalinput/elementvaluedidchangehandler
---

# elementValueDidChangeHandler

A block that the profile calls when an element’s value changes.

## Declaration

```swift
var elementValueDidChangeHandler: ((any GCDevicePhysicalInput, any GCPhysicalInputElement) -> Void)? { get set }
```

## Mentioned in

Handling input events

## Discussion

Discussion Use this property to get the latest state of the element. If multiple elements change, Game Controller invokes this block for each element that changes. The block’s parameters are: important: To track every element value change, set the inputStateAvailableHandler property instead and use the nextInputState() method to get all the buffered changes.

## See Also

### Handling device input

- [nextInputState()](gamecontroller/gcdevicephysicalinput/nextinputstate().md)
- [inputStateAvailableHandler](gamecontroller/gcdevicephysicalinput/inputstateavailablehandler.md)
- [inputStateQueueDepth](gamecontroller/gcdevicephysicalinput/inputstatequeuedepth.md)
- [capture()](gamecontroller/gcdevicephysicalinput/capture().md)
