# Help: Why is my Enhanced Input Started event being called twice?

**URL:** <https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question\
**Created:** [January 5, 2025, 2:35pm UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911 "2025-01-05T14:35:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![StevenX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StevenX](https://forums.unrealengine.com/u/StevenX)\
**Post date:** [January 5, 2025, 2:35pm UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/1 "2025-01-05T14:35:27Z")

</div>

I set the binding to `Started` mode in C++, but when I press a key once in the game, the function is called twice. Does anyone know why this is happening?

“.h file”  
UEnhancedInputLocalPlayerSubsystem\* Subsystem;  
UEnhancedInputComponent\* Input;

“.cpp file”

void APeopPlayController::SetupInputComponent()  
{  
Super::SetupInputComponent();

```
Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer());

check(InputMapping);

Subsystem->ClearAllMappings();
Subsystem->AddMappingContext(InputMapping,0);

Input = Cast<UEnhancedInputComponent>(InputComponent);
Input->BindAction(IA_Move, ETriggerEvent::Triggered, this, &APeopPlayController::Move);
Input->BindAction(IA_Jump, ETriggerEvent::Triggered, this, &APeopPlayController::isJump);
Input->BindAction(IA_Jump, ETriggerEvent::Completed, this, &APeopPlayController::isJump);
Input->BindAction(IA_Look, ETriggerEvent::Triggered, this, &APeopPlayController::Look);
Input->BindAction(IA_E, ETriggerEvent::Started, this, &APeopPlayController::EKey);

```

}

void APeopPlayController::EKey(const FInputActionValue& Value)  
{  
GEngine-\>AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT(“EKey”));  
}

---

<div class="post-metadata">

**Author:** ![xenofsnstudios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xenofsnstudios/32/1194578_2.png) [@xenofsnstudios](https://forums.unrealengine.com/u/xenofsnstudios)\
**Post date:** [January 5, 2025, 6:04pm UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/2 "2025-01-05T18:04:14Z")

</div>

The same action IA\_Jump is bound twice, once for Triggered and once for Completed.

- **Triggered:** The action was triggered. This means that it has completed the evaluation of all trigger requirements. For example, a “Press and Release” trigger is sent when the user releases the key.
- **Completed:** The trigger evaluation process is completed.

I haven’t seen how you set up your input action, but I’ll assume you set the Trigger to “Pressed”, and if so, it means that Triggered and Completed are the same thing, so your function is called twice.

Read about trigger states here:

> **[Enhanced Input in Unreal Engine | Unreal Engine 5.5 Documentation | Epic...](https://dev.epicgames.com/documentation/en-us/unreal-engine/enhanced-input-in-unreal-engine)**
>
> An overview of the Enhanced Input Plugin in Unreal Engine

As for IA\_E, I can’t tell what’s wrong unless I see how the input action is set up. There also might be something strange with your input context.

---

<div class="post-metadata">

**Author:** ![StevenX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StevenX](https://forums.unrealengine.com/u/StevenX)\
**Post date:** [January 6, 2025, 2:11pm UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/3 "2025-01-06T14:11:12Z")

</div>

Hello, I uploaded my project on GitHub. Can you take a look and see why?

> **[GitHub - stevenABCE/MyP1](https://github.com/stevenABCE/MyP1)**
>
> Contribute to stevenABCE/MyP1 development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![xenofsnstudios](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xenofsnstudios/32/1194578_2.png) [@xenofsnstudios](https://forums.unrealengine.com/u/xenofsnstudios)\
**Post date:** [January 6, 2025, 2:53pm UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/4 "2025-01-06T14:53:50Z")

</div>

No.

I don’t have that version of Unreal installed anyways. Just post screenshots of your input action and context with the details expanded.

---

<div class="post-metadata">

**Author:** ![StevenX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StevenX](https://forums.unrealengine.com/u/StevenX)\
**Post date:** [January 7, 2025, 6:10am UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/5 "2025-01-07T06:10:03Z")

</div>

ok,The following situation doesn’t involve only the ‘e’ key; when I set the ‘w’ key to ‘started,’ it also triggered twice. Let me know if you need any additional information

 ![屏幕截图 2025-01-07 135113](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/d/8/bd824e6acf05167bac0404ed007971c51890f206.png)  
 ![屏幕截图 2025-01-07 135201](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/1/731bc2b4f83949d769c5fdc6b9c5041016910965.png)  
 ![屏幕截图 2025-01-07 135224](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/f/7cf67e177498a82a8cc5479045c7c2e1410e77a0.png)  
 ![屏幕截图 2025-01-07 135252](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/3/1/131d6856e38cf297da72b2f0ddc2fb9afbdbd88b.png)  
 ![屏幕截图 2025-01-07 140004](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/7/4e7c0e96d920d0b5e638a7874a66301b39da3546.png)  
 ![屏幕截图 2025-01-07 140101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/2/8d2685e33fdd42a718bf8056a474785a5e0247b7.png)  
 ![屏幕截图 2025-01-07 140125](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/f/8bf517566915658e2e81e51ad30abc4bb215dd03.png)  
 ![屏幕截图 2025-01-07 140702](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/2/a/42ac3aeae106f19250a6eedc8d9dd2612bac5f28.png)  
 ![屏幕截图 2025-01-07 140844](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/4/5/9457585c69e20c5c719a6039676c929c7b77559c.png)  
 ![屏幕截图 2025-01-07 141952](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/f/f9f43f6827bb932ababd60d909096407f7c07f93.png)

---

<div class="post-metadata">

**Author:** ![StevenX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@StevenX](https://forums.unrealengine.com/u/StevenX)\
**Post date:** [January 7, 2025, 11:33am UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/6 "2025-01-07T11:33:43Z")

</div>

Thanks，The issue has been resolved. `SetupInputComponent` is automatically called by the system and does not need to be called manually.

---

<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:** [February 6, 2025, 11:34am UTC](https://forums.unrealengine.com/t/help-why-is-my-enhanced-input-started-event-being-called-twice/2260911/7 "2025-02-06T11:34:38Z")

</div>

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