# How to prevent UMG button from handling inputs

**URL:** <https://forums.unrealengine.com/t/how-to-prevent-umg-button-from-handling-inputs/453536>\
**Category:** UI\
**Tags:** Input, unreal-engine, UE4, CPP, question, UMG\
**Created:** [August 7, 2019, 11:07pm UTC](https://forums.unrealengine.com/t/how-to-prevent-umg-button-from-handling-inputs/453536 "2019-08-07T23:07:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KazemAkhgary](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KazemAkhgary](https://forums.unrealengine.com/u/KazemAkhgary)\
**Post date:** [August 7, 2019, 11:07pm UTC](https://forums.unrealengine.com/t/how-to-prevent-umg-button-from-handling-inputs/453536/1 "2019-08-07T23:07:01Z")

</div>

I have bound an input in my player controller like so

```
InputComponent->BindTouch(IE_Pressed, this, &ATouchPlayerController::TouchStarted);
InputComponent->BindTouch(IE_Released, this, &ATouchPlayerController::TouchStopped);
InputComponent->BindTouch(IE_Repeat, this, &ATouchPlayerController::TouchMoved);

```

This is used for handling various actions like moving character, camera rotation, swipe, double tap, etc…

I want to place a fire button in my widget. but this button when pressed, will not let my player controller to receive touch inputs anymore.

I want the button to receive touch inputs but let the player controller to receive same input as well. simply pass it through. how can I achieve this? (how should I override button class?)

---

<div class="post-metadata">

**Author:** ![CosmicLobster](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cosmiclobster/32/1211357_2.png) [@CosmicLobster](https://forums.unrealengine.com/u/CosmicLobster)\
**Post date:** [August 8, 2019, 5:07pm UTC](https://forums.unrealengine.com/t/how-to-prevent-umg-button-from-handling-inputs/453536/2 "2019-08-08T17:07:41Z")

</div>

Hi!

APlayerController::SetInputMode gives you control over this.

> **[APlayerController::SetInputMode](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/APlayerController/SetInputMode/)**
>
> Setup an input mode.

use either FInputModeGameAndUI / FInputModeGameOnly / FInputModeUIOnly

> **[FInputModeDataBase](https://docs.unrealengine.com/4.27/en-US/API/Runtime/Engine/GameFramework/FInputModeDataBase/)**
>
> Abstract base class for Input Mode structures

In Blueprints it would look like this

> **[Set Input Mode Game And UI](https://docs.unrealengine.com/4.27/en-US/BlueprintAPI/Input/SetInputModeGameAndUI/)**
>
> Set Input Mode Game And UI

Hope this helps

Cheers!
