# Extract key from the Enhanced Input action

**URL:** <https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [September 26, 2023, 1:20pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805 "2023-09-26T13:20:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Etyuhibosecyu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etyuhibosecyu/32/1044081_2.png) [@Etyuhibosecyu](https://forums.unrealengine.com/u/Etyuhibosecyu)\
**Post date:** [September 26, 2023, 1:20pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805/1 "2023-09-26T13:20:04Z")

</div>

Thanks to [this](https://forums.unrealengine.com/t/enhanced-input-actions-dont-fire/1312496/3) topic and the reply of @Everynone in it, the Enhanced Input actions now work. But how to get the actual key of that action? I have an “Ability” action that has multiple keys for the different abilities and I don’t want to create tens of Input actions. Can somebody help?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 26, 2023, 1:35pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805/2 "2023-09-26T13:35:06Z")

</div>

> [@Etyuhibosecyu](#):
>
> But how to get the actual key of that action? I have an “Ability” action that has multiple keys for the different abilities and I don’t want to create tens of Input actions. Can somebody help?

> [@Enhanced Input System misunderstandings.](https://forums.unrealengine.com/t/enhanced-input-system-misunderstandings/1312554):
>
> Im new to Unreal Engine. For now i cant wrap my head around input system. I want to make switch items system with number keys(0-9). Do I really have to create different IA for every key? Or i can put all keys i need in IA and somehow get each pressed key from input event in graph? Because i dont see that keys in enhanced input system can return values vider than -1 to 1 in my case. As always, sorry if it sounds stupid.

Seems very relevant. At least it’s now linked.

---

<div class="post-metadata">

**Author:** ![Etyuhibosecyu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etyuhibosecyu/32/1044081_2.png) [@Etyuhibosecyu](https://forums.unrealengine.com/u/Etyuhibosecyu)\
**Post date:** [September 26, 2023, 1:43pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805/3 "2023-09-26T13:43:39Z")

</div>

Sorry but I didn’t understand this:

> [@Enhanced Input System misunderstandings.](https://forums.unrealengine.com/t/enhanced-input-system-misunderstandings/1312554/2):
>
> Why can’t we have nice things and have the key struct returned here?

Do you point onto Value Type? Or onto Reserve All Mappings? Where there the key struct is returned?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 26, 2023, 1:44pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805/4 "2023-09-26T13:44:40Z")

</div>

That’s the whole point. We don’t know it works / is supposed to work / is achievable / designed to handle this. Seems useful and desirable. I don’t see a way, but you can do it with the included, albeit awkward, script.

I was merely hoping someone knows a better way…

---

<div class="post-metadata">

**Author:** ![Etyuhibosecyu](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/etyuhibosecyu/32/1044081_2.png) [@Etyuhibosecyu](https://forums.unrealengine.com/u/Etyuhibosecyu)\
**Post date:** [September 26, 2023, 2:06pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805/5 "2023-09-26T14:06:48Z")

</div>

Thanks, now it works!

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 26, 2023, 2:07pm UTC](https://forums.unrealengine.com/t/extract-key-from-the-enhanced-input-action/1312805/6 "2023-10-26T14:07:28Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
