> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IGameInputDevice::IsConnected

> Indicates whether the input device is currently connected.

Indicates whether the input device is currently connected.

## Syntax

```cpp theme={null}
bool IsConnected();
```

### Parameters

This method has no parameters.

### Return value

Type: bool

`true` if the device is currently connected; otherwise, `false`.

## Remarks

An `IGameInputDevice` object remains valid after the physical device disconnects, so your application can keep a reference to it. While the device is disconnected, `IsConnected` returns `false`, and the device doesn't produce new readings. If the device reconnects with the same device ID (see [IGameInputDevice::GetDeviceId](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceid.md)), GameInput reuses the same device object, and `IsConnected` returns `true` again.

To be notified when a device connects or disconnects instead of polling this method, register a device callback by calling [IGameInput::RegisterDeviceCallback](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md). The callback receives the `GameInputDeviceEventConnected` and `GameInputDeviceEventDisconnected` values of [GameInputDeviceEvent](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/enums/gameinputdeviceevent).

In GameInput v3 and earlier, you checked for the `GameInputDeviceConnected` flag in the value returned by [IGameInputDevice::GetDeviceStatus](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdevicestatus.md).

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)\
[GameInputDeviceEvent](https://learn.microsoft.com/en-us/gaming/gdk/docs/reference/input/gameinput/enums/gameinputdeviceevent)\
[IGameInput::RegisterDeviceCallback](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinput/methods/igameinput_registerdevicecallback.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [GameInputDeviceCallback](https://docs.xbox.com/reference/input/gameinput/functions/gameinputdevicecallback.md)
- [GameInputDeviceStatus (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/enums/gameinputdevicestatus.md)
- [GetDeviceStatus (Deprecated)](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdevicestatus.md)
- [Deprecated GameInput API members](https://docs.xbox.com/reference/input/gameinput/deprecated/gameinput_deprecated_members.md)
- [GameInput API Versioning](https://docs.xbox.com/build/core-features/common/input/overviews/input-versioning.md)
