> ## 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.

# IGameInputReading::GetKeyCount

> IGameInputReading::GetKeyCount

# IGameInputReading::GetKeyCount

キーボード上でアクティブなキーの数を取得します。

## 構文

```cpp theme={null}
uint32_t GetKeyCount();
```

### パラメーター

このメソッドにはパラメーターはありません。

### 戻り値

型: uint32\_t

ゲーム コントローラー上でアクティブなキーの数を返します。

## 解説

`IGameInputReading::GetKeyCount` メソッドは、ゲーム コントローラー上でアクティブなキーの数を取得します。これは、[IGameInputReading::GetKeyState](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate) メソッドで必要となる配列の数を決定するために使用します。GameInput API の中級および上級のユース ケースについては、[GameInput の高度なトピック](/build/core-features/common/input/advanced/input-advanced-topics)を参照してください。

## 要件

**ヘッダー:** GameInput.h

[GameInput の概要](/build/core-features/common/input/overviews/input-overview)\
[IGameInputReading](/reference/input/gameinput/interfaces/igameinputreading/igameinputreading)

## バージョン履歴

| バージョン  | 変更点 |
| ------ | --- |
| **v0** | 導入。 |


## Related topics

- [IGameInputReading::GetKeyState](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getkeystate.md)
- [IGameInputReading::GetTouchCount](/ja-jp/reference/input/gameinput/deprecated/interfaces/igameinputreading/methods/igameinputreading_gettouchcount.md)
- [IGameInputReading::GetControllerAxisCount](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrolleraxiscount.md)
- [IGameInputReading::GetControllerButtonCount](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttoncount.md)
- [IGameInputReading::GetControllerSwitchCount](/ja-jp/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerswitchcount.md)
