---
title: isAnyKeyPressed
framework: gamecontroller
role: symbol
role_heading: Instance Property
path: gamecontroller/gckeyboardinput/isanykeypressed
---

# isAnyKeyPressed

A Boolean value that indicates whether the user is pressing any of the keys.

## Declaration

```swift
var isAnyKeyPressed: Bool { get }
```

## Discussion

Discussion If true, the user is pressing a key; otherwise, the user isn’t. You can use this property to check whether the user presses any key before getting the state of specific keys.

## See Also

### Accessing Buttons

- [button(forKeyCode:)](gamecontroller/gckeyboardinput/button(forkeycode:).md)
- [GCKeyCode](gamecontroller/gckeycode.md)
- [Keycode Constants](gamecontroller/keycode-constants.md)
