# Is there anyway to pass the Key with Enhanced Input?

**URL:** <https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, editor, Blueprint, question\
**Created:** [October 20, 2023, 12:29am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258 "2023-10-20T00:29:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaker\_The\_Cake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gaker\_The\_Cake](https://forums.unrealengine.com/u/Gaker_The_Cake)\
**Post date:** [October 20, 2023, 12:29am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/1 "2023-10-20T00:29:00Z")

</div>

Hello, so I’m trying to make a prototype where there is only 1 ability, but every key on the keyboard both activates and changes what it does without any other key input as well as making it so the typical modifier keys further modifying the action. So I was hoping there would be a way of passing the Key because I want to use the features coming out in 5.4+ but I don’t know if the depreciated input system will be around that long. I know I could just make an IA\_(Action) for every key, but that seems like a huge undertaking for what I was hoping was just a month of messing around.

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [October 20, 2023, 3:37am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/2 "2023-10-20T03:37:17Z")

</div>

> [@Gaker\_The\_Cake](#):
>
> huge undertaking

Dude, I think it will only take 10 minutes at most.

---

<div class="post-metadata">

**Author:** ![Spacemarine658](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/spacemarine658/32/1194677_2.png) [@Spacemarine658](https://forums.unrealengine.com/u/Spacemarine658)\
**Post date:** [October 20, 2023, 3:45am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/3 "2023-10-20T03:45:28Z")

</div>

Yes there is here is how I do it

 ![image-10](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/a/e1a2ca72bca49dcb8dd4ac73d258cc0e1d868564.png)  
 ![image-20](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/b/81bfb4f18031b7c52365fdb5b6c6c6f04474b933.png)

---

<div class="post-metadata">

**Author:** ![IrSoil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@IrSoil](https://forums.unrealengine.com/u/IrSoil)\
**Post date:** [October 20, 2023, 7:24am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/4 "2023-10-20T07:24:02Z")

</div>

Kinda answered here:

> [@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.

In short, at times of 5.3: either use a crude solution via scaling float input value via `Scalar` modifier (has limitations), either move EnhancedInput plugin to project and extend structures so you can add custom data to input mapping bindings

---

<div class="post-metadata">

**Author:** ![Gaker\_The\_Cake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Gaker\_The\_Cake](https://forums.unrealengine.com/u/Gaker_The_Cake)\
**Post date:** [October 20, 2023, 3:46pm UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/5 "2023-10-20T15:46:40Z")

</div>

Making the actions might only take 10 minutes, but the amount of time introduced by making input action events, going back correcting them, etc looked like a huge hassle that would be made even worse if I find problems or need to add keys. The prototype I’m working on is a bit of a gag game in messing with the player by constantly changing things so I need the Keys for a multitude of reasons; one being that if you accidentally spell something out with past uses it is spawned and starts hunting you. I know I could do that by setting a variable, but if I can’t get the key that changes based on what’s going on in the game then I can’t do what I wanted to.

So, yeah, that’s why I’d prefer a clean solution.

---

<div class="post-metadata">

**Author:** ![DomusLudus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/domusludus/32/1215140_2.png) [@DomusLudus](https://forums.unrealengine.com/u/DomusLudus)\
**Post date:** [October 21, 2023, 6:33am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/6 "2023-10-21T06:33:06Z")

</div>

If you just want to know which key was pressed, and not take advantage of any “Enhanced Input Plugin” possibilitties, which is what happens with these solutions, there is the “anykey event” that tells you which key was pressed  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/b/02befa1b2c8bf944d21422808bdc1ff17e7c87b7.png)

---

<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:** [November 20, 2023, 6:33am UTC](https://forums.unrealengine.com/t/is-there-anyway-to-pass-the-key-with-enhanced-input/1338258/7 "2023-11-20T06:33:52Z")

</div>

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