# Control UI using WASD instead of Arrow Keys?

**URL:** <https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920>\
**Category:** UI\
**Tags:** hud, Input, unreal-engine, UI, Widget, question\
**Created:** [October 14, 2019, 5:53pm UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920 "2019-10-14T17:53:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bulgogi\_king](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bulgogi\_king](https://forums.unrealengine.com/u/bulgogi_king)\
**Post date:** [October 14, 2019, 5:53pm UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920/1 "2019-10-14T17:53:52Z")

</div>

Hello, I’ve created a UI Menu that can be navigated with a gamepad or the keyboard arrow keys. This was done by setting the game focus to my UI widget.

However, because my game uses WASD to move, I feel like it would be more intuitive and feel more natural if the player could navigate the menu using WASD as well/instead of the arrow keys. Is there a setting, or perhaps method to do this?

---

<div class="post-metadata">

**Author:** ![Berkay\_Tuna](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Berkay\_Tuna](https://forums.unrealengine.com/u/Berkay_Tuna)\
**Post date:** [April 4, 2020, 10:38am UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920/2 "2020-04-04T10:38:03Z")

</div>

Hello, pictures and their descriptions show my workaround.

---

<div class="post-metadata">

**Author:** ![clockwise\_mu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@clockwise\_mu](https://forums.unrealengine.com/u/clockwise_mu)\
**Post date:** [August 19, 2020, 6:02am UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920/3 "2020-08-19T06:02:38Z")

</div>

You can do this in C++ by subclassing FNavigationConfig and setting the SlateApplication to use an instance of your class:

(Mile-high view assuming you are familiar with C++ side programming in the engine)

```
class GAME_API FGameNavigationConfig : public FNavigationConfig
{
public:
	FGameNavigationConfig() {
	KeyEventRules.Reset();
	
	KeyEventRules.Emplace(EKeys::A, EUINavigation::Left);
	KeyEventRules.Emplace(EKeys::D, EUINavigation::Right);
	KeyEventRules.Emplace(EKeys::W, EUINavigation::Up);
	KeyEventRules.Emplace(EKeys::S, EUINavigation::Down);
}
};

```

Then to set these rules (I did it in my game mode Login function):

```
FSlateApplication::Get().SetNavigationConfig(gameNavigationConfig);

```

where in my GameMode definition I have:

```
TSharedRef<FGameNavigationConfig> gameNavigationConfig;

```

and my GameMode constructor:

```
MyGameMode::MyGameMode() : gameNavigationConfig(MakeShared<FGameNavigationConfig>())

```

Note you might have to add some Modules to the project:

```
PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore", "InputCore" });

```

Hope this helps

---

<div class="post-metadata">

**Author:** ![WeirdGoat1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WeirdGoat1](https://forums.unrealengine.com/u/WeirdGoat1)\
**Post date:** [June 4, 2024, 5:00am UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920/4 "2024-06-04T05:00:20Z")

</div>

I call FSlateApplication::Get().SetNavigationConfig(gameNavigationConfig); in `BeginPlay`, also works! Do you know how to change Confirm key from space bar to Enter? Thanks!

---

<div class="post-metadata">

**Author:** ![Mastatatoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mastatatoe/32/1152947_2.png) [@Mastatatoe](https://forums.unrealengine.com/u/Mastatatoe)\
**Post date:** [February 16, 2026, 4:53pm UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920/5 "2026-02-16T16:53:48Z")

</div>

please attach the pictures

---

<div class="post-metadata">

**Author:** ![Mastatatoe](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mastatatoe/32/1152947_2.png) [@Mastatatoe](https://forums.unrealengine.com/u/Mastatatoe)\
**Post date:** [February 16, 2026, 4:55pm UTC](https://forums.unrealengine.com/t/control-ui-using-wasd-instead-of-arrow-keys/456920/6 "2026-02-16T16:55:02Z")

</div>

im cooked why is it so hard to do such a simple mechanic
