<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCKeyboardValueChangedHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:@T@GCKeyboardValueChangedHandler"
  },
  "title" : "GCKeyboardValueChangedHandler"
}
-->

# GCKeyboardValueChangedHandler

The signature for the block that the keyboard input profile calls when a key value changes.

```
typealias GCKeyboardValueChangedHandler = (GCKeyboardInput, GCControllerButtonInput, GCKeyCode, Bool) -> Void
```

## Parameters

`keyboard`

The keyboard controller profile for the physical keyboard.

`key`

The element for the key that changes.

`keyCode`

The code for the key that changes.

`pressed`

<doc://com.apple.documentation/documentation/Swift/true> if the user presses the key at the time the change occurs; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

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)