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

# GameInputKeyState

> GameInputKeyState

# GameInputKeyState

Describes the state of an active key on a game controller.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
struct GameInputKeyState
{
    uint32_t scanCode;
    uint32_t codePoint;
    uint8_t  virtualKey;
    bool     isDeadKey;
};
```

<a id="membersSection" />

### Members

*scanCode*<br />
Type: uint32\_t

The scan code of the key.

*codePoint*<br />
Type: uint32\_t

The Unicode code point of the physical glyph on the key.

*virtualKey*<br />
Type: uint8\_t

The virtual-key code.

*isDeadKey*<br />
Type: bool

Indicates whether the key is dead. (A dead key modifies the character generated by the next keystroke.)

<a id="remarksSection" />

## Remarks

This structure is used by the [IGameInputReading::GetKeyState](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate) method. `GetKeyState` is intended solely for mapping keyboard input to game actions, not for regular text input.

For more information, see [GameInput readings](/build/core-features/common/input/overviews/input-readings).

<a id="requirementsSection" />

## Requirements

**Header:** GameInput.h

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

<a id="seealsoSection" />

## Conceptual documentation

* [GameInput keyboard and mouse](/build/core-features/common/input/advanced/input-keyboard-mouse)

## See also

[Overview of GameInput](/build/core-features/common/input/overviews/input-overview)\
[GameInput](/reference/input/gameinput/gameinput_members)

## Version History

| Version | Changes     |
| ------- | ----------- |
| **v0**  | Introduced. |


## Related topics

- [IGameInputReading::GetKeyState](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate.md)
- [GameInput](/reference/input/gameinput/gameinput_members.md)
- [IGameInputReading::GetKeyCount](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeycount.md)
- [GameInputGamepadState](/reference/input/gameinput/structs/gameinputgamepadstate.md)
- [GameInputSensorsState](/reference/input/gameinput/structs/gameinputsensorsstate.md)
