# Get list of key/gamepad in an array in C++

**URL:** <https://forums.unrealengine.com/t/get-list-of-key-gamepad-in-an-array-in-c/291942>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question\
**Created:** [August 25, 2014, 3:30am UTC](https://forums.unrealengine.com/t/get-list-of-key-gamepad-in-an-array-in-c/291942 "2014-08-25T03:30:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sameek4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sameek4](https://forums.unrealengine.com/u/sameek4)\
**Post date:** [August 25, 2014, 3:30am UTC](https://forums.unrealengine.com/t/get-list-of-key-gamepad-in-an-array-in-c/291942/1 "2014-08-25T03:30:25Z")

</div>

Hi,

The below article shows all the list of keys as understood by unreal engine.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Now i want to get a list of all keys in C++ through some method call , so that I can match the names with the input config file keys , to validate the current input value bound to a specific action , as obtained from the config file. Something like this :

GetConfigString(TEXT("/Script/Engine.InputSettings"), key, value1, GInputIni);

if(! _GetAllkeys_.Contains(value1)  
{

SetConfigString(TEXT("/Script/Engine.InputSettings"), key, value2, GInputIni);

value1 = value2;

}

How to I do that?

---

<div class="post-metadata">

**Author:** ![sameek4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sameek4](https://forums.unrealengine.com/u/sameek4)\
**Post date:** [August 25, 2014, 6:11pm UTC](https://forums.unrealengine.com/t/get-list-of-key-gamepad-in-an-array-in-c/291942/2 "2014-08-25T18:11:56Z")

</div>

Hi ,

I solved it out myself. I have to use this syntax to get if the key is valid

FKey(FName(\*value1)).IsValid()
