# Enhanced Input key with modifier

**URL:** <https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258>\
**Category:** Blueprint\
**Tags:** unreal-engine, question\
**Created:** [February 3, 2023, 10:17pm UTC](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258 "2023-02-03T22:17:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [February 3, 2023, 10:17pm UTC](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258/1 "2023-02-03T22:17:18Z")

</div>

Hi everyone,  
I recently started working with enhanced input and found that the documentation is missing. Couldn’t find any information about keyboard modifiers like in the old input system.

 ![1675461711622](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/3/c/43ca998e6a6879ac82f507d20cb1e107000721b2.jpeg)

I only found this approach which looks like a square wheel. Is there a better/easier way?

> [@Enhanced Input key with modifier?](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/486208/2):
>
> So I actually found out how to do this but I’m not a big fan of this approach since the whole idea behind input actions is that they are input method/key binding agnostic. I noticed the “Chorded Action” trigger and this basically allows you to have an action only triggered when another one is triggered. Using these I created separate input actions for my keyboard modifier keys. They all have the same properties. I unchecked “Consume input” but this depends on your needs. I the…

---

<div class="post-metadata">

**Author:** ![shq300](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shq300](https://forums.unrealengine.com/u/shq300)\
**Post date:** [July 16, 2023, 1:03pm UTC](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258/2 "2023-07-16T13:03:07Z")

</div>

Hey, you could create a new trigger (that derives from Input Trigger class) and check whether or not the modifier key is currently pressed. This can be done by overridding the UpdateState function, getting the Player Input outer (APlayerController) and using one of the input utility functions, i.e. Is Input Key Down. Promote the Key to a variable so you can set it in your mapping context later.

 ![EnhInput_KeyMod01](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/1/f11ac2963fea9295711352cbc3d82c2d628707eb.png)  
 ![EnhInput_KeyMod02](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/e/f9ec8a5c3c4f1b1a1cfd9fd859e5a308194c47c2.png)

---

<div class="post-metadata">

**Author:** ![Yaklakootmaa2](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/yaklakootmaa2/32/1194607_2.png) [@Yaklakootmaa2](https://forums.unrealengine.com/u/Yaklakootmaa2)\
**Post date:** [July 17, 2023, 7:53pm UTC](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258/3 "2023-07-17T19:53:19Z")

</div>

Yes, I did almost the same

---

<div class="post-metadata">

**Author:** ![PDubulous](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/pdubulous/32/1194655_2.png) [@PDubulous](https://forums.unrealengine.com/u/PDubulous)\
**Post date:** [July 27, 2023, 3:33pm UTC](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258/4 "2023-07-27T15:33:23Z")

</div>

This is actually the best way to do these. I found that the modifiers seem to either be set to be pressed at the same time or the modifier itself consumes the input. If you mash the buttons you can see them run occasionally but you have to hit it just right.

If you do it with the “Is Input Key Down” node there are no issues.

---

<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:** [August 26, 2023, 3:33pm UTC](https://forums.unrealengine.com/t/enhanced-input-key-with-modifier/763258/5 "2023-08-26T15:33:52Z")

</div>

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