# Input is overridden by navigation input in Common UI. How to override?

**URL:** <https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563>\
**Category:** UI\
**Tags:** unreal-engine, Widget, question, Blueprint, UMG\
**Created:** [April 14, 2023, 9:50am UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563 "2023-04-14T09:50:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GamesByHyper\_Eric](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamesbyhyper_eric/32/709237_2.png) [@GamesByHyper\_Eric](https://forums.unrealengine.com/u/GamesByHyper_Eric)\
**Post date:** [April 14, 2023, 9:50am UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/1 "2023-04-14T09:50:11Z")

</div>

Hey all,

I am trying to retrieve an input action that is binded on an input that is normally also used for navigation: E.g. thumbstick left left / left right, gamepad left/right etc.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/2/5/225aa1f0d23928cdeb3e670cd991e0c923d2c9f2.png)

When I change the input to anything else e.g. face button top, the button is being triggered (clicked). But when I assign it to something that is used for navigation, it gets consumed and does not trigger the bound button.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/3/a63f264a4c6a1ab1005f4ce40c52814cf944a25b.png)

I did find a workaround. For anyone that is searching for it, basically it is forcing the listen to the input and execute a custom event in the widget itself.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/3/a/f3adb8777f6114195f0c4e37cadab815e3c9981d.png)

However, I would like to not use this workaround for cleanness. If anyone has an idea, please feel free to reach out.

Thank you in advance and with kind regards,

Eric

---

<div class="post-metadata">

**Author:** ![MaartiBr](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/maartibr/32/731901_2.png) [@MaartiBr](https://forums.unrealengine.com/u/MaartiBr)\
**Post date:** [May 20, 2023, 10:21pm UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/2 "2023-05-20T22:21:27Z")

</div>

Hey, as I’m facing the same problem, I wanted to thank you for your workaround.

And while I was implementing it, I also found another way:  
In my widget “container” (for me it’s an horizontal box), I saw you can bind custom functions to respond to navigation input:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/c/aece1f0092951a682c1ba16be39596e32a9ced66.png)

I’m not sure that’s what you are looking for, or if it’s “CommonUI-friendly”, but just wanted to mention it.

---

<div class="post-metadata">

**Author:** ![GamesByHyper\_Eric](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gamesbyhyper_eric/32/709237_2.png) [@GamesByHyper\_Eric](https://forums.unrealengine.com/u/GamesByHyper_Eric)\
**Post date:** [June 1, 2023, 9:30am UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/3 "2023-06-01T09:30:10Z")

</div>

Thanks! Will try if this solves the automatic listen. For now my workaround seems very stable. I have found multiple of these things in Common UI. Probably will do a tutorial series on it.

---

<div class="post-metadata">

**Author:** ![mattai](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mattai/32/731470_2.png) [@mattai](https://forums.unrealengine.com/u/mattai)\
**Post date:** [May 17, 2024, 9:30pm UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/4 "2024-05-17T21:30:47Z")

</div>

The way I managed to work around this issue is to create a subclass of `FNavigationConfig` and to set it using `FSlateApplication::Get().SetNavigationConfig(NavigationConfig);`.  
In my subclass, I overrode some methods such as `virtual EUINavigation GetNavigationDirectionFromKey(const FKeyEvent& InKeyEvent) const override;` that returns `EUINavigation::Invalid` when I disabled navigation.  
You can also define your “mappings” for instance, the default is:

```auto
FNavigationConfig::FNavigationConfig()
	: bTabNavigation(true)
	, bKeyNavigation(true)
	, bAnalogNavigation(true)
	, bIgnoreModifiersForNavigationActions(true)
	, AnalogNavigationHorizontalThreshold(0.50f)
	, AnalogNavigationVerticalThreshold(0.50f)
{
	AnalogHorizontalKey = EKeys::Gamepad_LeftX;
	AnalogVerticalKey = EKeys::Gamepad_LeftY;

	KeyEventRules.Emplace(EKeys::Left, EUINavigation::Left);
	KeyEventRules.Emplace(EKeys::Gamepad_DPad_Left, EUINavigation::Left);

	KeyEventRules.Emplace(EKeys::Right, EUINavigation::Right);
	KeyEventRules.Emplace(EKeys::Gamepad_DPad_Right, EUINavigation::Right);

	KeyEventRules.Emplace(EKeys::Up, EUINavigation::Up);
	KeyEventRules.Emplace(EKeys::Gamepad_DPad_Up, EUINavigation::Up);

	KeyEventRules.Emplace(EKeys::Down, EUINavigation::Down);
	KeyEventRules.Emplace(EKeys::Gamepad_DPad_Down, EUINavigation::Down);

	// By default, enter, space, and gamepad accept are all counted as accept
	KeyActionRules.Emplace(EKeys::Enter, EUINavigationAction::Accept);
	KeyActionRules.Emplace(EKeys::SpaceBar, EUINavigationAction::Accept);
	KeyActionRules.Emplace(EKeys::Virtual_Accept, EUINavigationAction::Accept);

	// By default, escape and gamepad back count as leaving current scope
	KeyActionRules.Emplace(EKeys::Escape, EUINavigationAction::Back);
	KeyActionRules.Emplace(EKeys::Virtual_Back, EUINavigationAction::Back);
}

```

But the engine also offers an alternate nav config with a subclass defining its own rules (and a good place to learn more about the Navigation config):

```auto
FTwinStickNavigationConfig::FTwinStickNavigationConfig()
{
	bTabNavigation = false;

	KeyEventRules =
	{
		{EKeys::Gamepad_DPad_Left, EUINavigation::Left},
		{EKeys::Gamepad_DPad_Right, EUINavigation::Right},
		{EKeys::Gamepad_DPad_Up, EUINavigation::Up},
		{EKeys::Gamepad_DPad_Down, EUINavigation::Down}
	};
}

```

---

<div class="post-metadata">

**Author:** ![CLOCKWALC](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockwalc/32/900931_2.png) [@CLOCKWALC](https://forums.unrealengine.com/u/CLOCKWALC)\
**Post date:** [September 8, 2024, 10:46am UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/5 "2024-09-08T10:46:50Z")

</div>

You can simply rebind the navigation input in this way, without creating new subclasses. Don’t forget to connect the Slate module and include Slate.h.

```auto
	TSharedRef<FNavigationConfig> InNavigationConfig = FSlateApplication::Get().GetNavigationConfig();

	InNavigationConfig.Get().AnalogHorizontalKey = EKeys::Gamepad_RightX;
	InNavigationConfig.Get().AnalogVerticalKey = EKeys::Gamepad_RightY;

	FSlateApplication::Get().SetNavigationConfig(InNavigationConfig);

```

---

<div class="post-metadata">

**Author:** ![GaLaX264](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GaLaX264](https://forums.unrealengine.com/u/GaLaX264)\
**Post date:** [January 14, 2025, 3:49pm UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/6 "2025-01-14T15:49:01Z")

</div>

Where am I supposed to write this code ? I’m really new to c++ and have no idea how to override these ui navigation it’s so frustrating

---

<div class="post-metadata">

**Author:** ![DragonRelt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dragonrelt/32/1075747_2.png) [@DragonRelt](https://forums.unrealengine.com/u/DragonRelt)\
**Post date:** [January 16, 2025, 1:27pm UTC](https://forums.unrealengine.com/t/input-is-overridden-by-navigation-input-in-common-ui-how-to-override/950563/9 "2025-01-16T13:27:22Z")

</div>

One thing you could do is run a branch from your input in your character and then have the beginning of what your working on say hey this needs to stop now so when i activate this widget i need to also set a Boolean which will make it so your input has no effect but you can still effect your widget, you may also want to get the focus of the thing your doing initially when opening your widget as well.  
Hope it helps.
