# Arrow keys don't trigger any key event when input mode is set to game + ui (or just ui)

**URL:** <https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736>\
**Category:** Blueprint\
**Tags:** unreal-engine, UE5-0, question, UMG\
**Created:** [April 12, 2022, 11:58am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736 "2022-04-12T11:58:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 12, 2022, 11:58am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/1 "2022-04-12T11:58:57Z")

</div>

is there any workaround for this?

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 12, 2022, 12:00pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/2 "2022-04-12T12:00:30Z")

</div>

Where are you expecting the key event? On the Widget? PlayerController? Pawn?  
Is it an input mapping event or an overriden method handling input?

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 12, 2022, 12:59pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/3 "2022-04-12T12:59:40Z")

</div>

widget, but if it worked anywhere else I could route it to the widget. except it doesn’t work anywhere I tested when input mode is set to UI. it’s just the navigation keys though, other keys work just fine.

I’m setting up keyboard/gamepad menu navigation, and I wanted to check button focus on navigation input instead of on tick or a timer.

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 14, 2022, 6:32am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/4 "2022-04-14T06:32:29Z")

</div>

So yeah it doesn’t matter where I put the arrow key event, I tried player controller, character, widget, whatever, if input mode is set to UI only or game+ui, it won’t trigger.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/d/27de0f09eb224a4ec0948686b951d4aee1eb46c1.png)

I’m guessing this is by design? is there a workaround?

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 14, 2022, 1:17pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/5 "2022-04-14T13:17:04Z")

</div>

I never noticed this… Slate navigation uses the arrow key for its built-in widget navigation, not sure if that is the conflict you are experiencing.  
On the widget you could override the function OnKeyDown and test if the pressed key is key up like this:

 ![keydown](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/7/bc7022e1cf24c5280da722ca4a64a515d15d933e.jpeg)

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 14, 2022, 1:19pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/6 "2022-04-14T13:19:04Z")

</div>

> [@fael097](#):
>
> I tried player controller, character,

Here you should normally implement the input as an input mapping (Project settings : ActionMapping / AxisMapping) . Can you test this for me?

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 14, 2022, 3:32pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/7 "2022-04-14T15:32:03Z")

</div>

> [@Roy\_Wierer.Seda145](#):
>
> Here you should normally implement the input as an input mapping (Project settings : ActionMapping / AxisMapping) . Can you test this for me?

it works in game+ui, as long as you don’t have a widget on focus.

I added both arrow up and W keys to a single input action, and if you’re focusing on a widget, only the W key will fire the input action, arrow key will navigate the widget and not fire anything (from any blueprints, not just widget but also player controller, character, etc). I suppose this is by design, but it makes a bit clunky to set up custom navigation (such as overriding on key down as you suggested, but with a branch for each key you need)

regardless, the override works for what I need, so thank you!

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 15, 2022, 2:13pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/8 "2022-04-15T14:13:16Z")

</div>

Is your problem solved for now?

In C++ you can override conflicting Slate input by implementing a custom config:

```auto
FSlateApplication::Get().SetNavigationConfig(TSharedRef<FCustomSlateNavigationConfig>(new FCustomSlateNavigationConfig()));

```

In that custom config you can define the navigation and actions of slate and their keys.

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 18, 2022, 2:29am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/9 "2022-04-18T02:29:40Z")

</div>

to be honest nope, not solved yet…

navigation keys won’t even trigger the “OnKeyDown” override.

I’m not familiar at all with C++, but if there’s no other way, where should I add that code?

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 18, 2022, 3:22am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/10 "2022-04-18T03:22:54Z")

</div>

Ah, well the c++ thing isn’t a 2 step process. First you create a new class:

.h

```auto
#pragma once

#include "Framework/Application/NavigationConfig.h"

class FCustomSlateNavigationConfig : public FNavigationConfig {

public:

	FCustomSlateNavigationConfig();

};

```

.cpp

```auto
#include "CustomSlateNavigationConfig.h"

FCustomSlateNavigationConfig::FCustomSlateNavigationConfig() {
	KeyEventRules.Empty();
 // Add your own KeyEventRules in the KeyEventRules array

}

```

Then from another place, like your module’s .cpp file you could override Slate’s navigation with the custom one like this:

```auto
	FSlateApplication::Get().SetNavigationConfig(TSharedRef<FCustomSlateNavigationConfig>(new FCustomSlateNavigationConfig()));

```

I have heavily modified my stuff, haven’t checked what the arrow key should behave like on a clean project, that’s one thing you can still try before deep diving into code.

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 20, 2022, 3:48am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/11 "2022-04-20T03:48:05Z")

</div>

> [@Roy\_Wierer.Seda145](#):
>
> I have heavily modified my stuff, haven’t checked what the arrow key should behave like on a clean project, that’s one thing you can still try before deep diving into code.

I’m on an empty project, so this is default behavior, when input mode is set to “UI only” or “Game + UI” the arrow keys, d-pad buttons, or any keys used for UI navigation by default simply don’t trigger any action input.

I don’t really want to change my navigation keys, all I want is the game to be able to recognize input method (keyboard+mouse or gamepad) when I’m in UI input mode, so when I’m navigating a menu, the game recognizes if I’m using a keyboard or a gamepad, and I can display the proper button icon.

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/6/8b681ca9c948fbc90b9687912cb163b1bf5af90e.jpeg)  
to

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/6/0/a609d5183d098b660fc3a4e91818e6d9e66b8669.jpeg)  
for example.

but when navigation keys don’t trigger anything, not even “on key down” events to override, it becomes impossible to do so.

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 20, 2022, 12:09pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/12 "2022-04-20T12:09:42Z")

</div>

> [@fael097](#):
>
> it becomes impossible to do so.

Not impossible, you can still detect the input device through an input processor and work from there.

> **[FSlateApplication::RegisterInputPreProcessor](https://docs.unrealengine.com/4.26/en-US/API/Runtime/Slate/Framework/Application/FSlateApplication/RegisterInputPre-/)**
>
> Adds input pre-processor if unique.

> <https://gist.github.com/sinbad/9b8f8007fb1e55f1a952cce2d12aaac1>

---

<div class="post-metadata">

**Author:** ![fael097](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/fael097/32/250778_2.png) [@fael097](https://forums.unrealengine.com/u/fael097)\
**Post date:** [April 29, 2022, 3:35am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/13 "2022-04-29T03:35:06Z")

</div>

thank you again, I really believe this could be a solution.

however, being mostly a 3d artists who took a while to learn blueprint, I have absolutely 0 experience with C++ or how to implement it in unreal. I literally don’t know where I should put this code, or what to change if I had to change anything.

perhaps you could point me directions to figure this out?

---

<div class="post-metadata">

**Author:** ![Roy\_Wierer.Seda145](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/roy_wierer.seda145/32/906551_2.png) [@Roy\_Wierer.Seda145](https://forums.unrealengine.com/u/Roy_Wierer.Seda145)\
**Post date:** [April 29, 2022, 3:43am UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/14 "2022-04-29T03:43:27Z")

</div>

It’s not a two step process but the code from that Github link does the input device registration already. What remains is that you need basic knowledge of c++ yourself and learn how to use Visual Studio (because the source code needs to be compiled afterwards). After that you still have to write the implementation for the UI system to respond to the input changes and all. You’d best be doing a few UE c++ tutorials and mess with it if you want to 🙂 .

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/4/0e41aef07525f4ef4e476c1b95fa1f40afab4ea7.jpeg "Unreal Engine 4 UI: C++ & Blueprints UMG Workflow Tutorial") ](https://www.youtube.com/watch?v=bWoew0fa_xA)

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/4/b2484c5f5b854788414f50475f8a9f19548f4c77.jpeg "Learn Unreal Engine C++ In One Hour") ](https://www.youtube.com/watch?v=nVm-DYdAsts)

---

<div class="post-metadata">

**Author:** ![Sklor](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sklor/32/1074675_2.png) [@Sklor](https://forums.unrealengine.com/u/Sklor)\
**Post date:** [March 24, 2025, 7:48pm UTC](https://forums.unrealengine.com/t/arrow-keys-dont-trigger-any-key-event-when-input-mode-is-set-to-game-ui-or-just-ui/525736/15 "2025-03-24T19:48:54Z")

</div>

I had this issue but figured out a solution in blueprints, that has worked for me so far.

In the widget I just had to override the function “OnPreviewKeyDown,” and then it prevented the widget from consuming the input. I had the function simply printing a string when it detected the key (up, down, left, right) and returned, which seemed to do the trick itself.

Hopefully this helps whoever runs into the same issue!
