# How to use Enhanced Input in widget?

**URL:** <https://forums.unrealengine.com/t/how-to-use-enhanced-input-in-widget/749917>\
**Category:** UI\
**Tags:** Input, unreal-engine, Widget, question\
**Created:** [January 15, 2023, 4:32pm UTC](https://forums.unrealengine.com/t/how-to-use-enhanced-input-in-widget/749917 "2023-01-15T16:32:47Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![CabbageOni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CabbageOni](https://forums.unrealengine.com/u/CabbageOni)\
**Post date:** [January 24, 2023, 6:38am UTC](https://forums.unrealengine.com/t/how-to-use-enhanced-input-in-widget/749917/3 "2023-01-24T06:38:52Z")

</div>

Thank you for the reply, though I really wanted the EIS to work also on widgets so I don’t have to divide input systems seperately.  
Recent attempt was to use BindAction:

```auto
void UPrototypeWidget::ConsumeGoBackAction(APrototypePlayerController* PlayerController)
{
  if (!IsValid(PlayerController) || !PlayerController->IsLocalPlayerController())
    return;

  UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(PlayerController->InputComponent);
  if (!IsValid(EnhancedInputComponent))
    return;

  m_GoBackActionBindingHandle = EnhancedInputComponent->BindAction(PlayerController->GoBackAction, ETriggerEvent::Started, this, &UPrototypeWidget::GoBackRequested).GetHandle();
}

void UPrototypeWidget::ReleaseGoBackAction(APrototypePlayerController* PlayerController)
{
  if (!IsValid(PlayerController) || !PlayerController->IsLocalPlayerController())
    return;

  UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(PlayerController->InputComponent);
  if (!IsValid(EnhancedInputComponent))
    return;

  EnhancedInputComponent->RemoveBindingByHandle(m_GoBackActionBindingHandle);
}

```

This can dynamically bind and unbind Action in EIS, but it suffers feature bugs described below:

> [@Enhanced Input Limitations and Bugs](https://forums.unrealengine.com/t/enhanced-input-limitations-and-bugs/235834/14):
>
> I just encountered this issue myself in UE 5.1. Does anyone have a workaround? Is the best approach to use the deprecated Input Mapping system?

I set the triger as ETriggerEvent::Started, yet it is called once again after calling RemoveBindingByHandle, which would create the widget again.  
There is the option ‘Ignore All Pressed Keys Until Release’ for mapping context, but not for bindAction… so I’m still looking for an alternative.

---

_[View the full topic](https://forums.unrealengine.com/t/how-to-use-enhanced-input-in-widget/749917)._
