Common UI Keyboard and Gamepad Navigation: WASD, Focus and Pushing Widgets

Table of Contents

Works in Unreal Engine 5.7 and 5.8. Updated November 2026.

Quick answer:

  1. WASD doesn’t move focus. Slate moves focus between buttons, not Common UI or Enhanced Input, and by default it only listens to the arrow keys and D-pad. Add W, A, S and D to Slate’s navigation config.
  2. A focused button ignores Enter or the gamepad. Don’t call Set Keyboard Focus. Override Get Desired Focus Target in your Common Activatable Widget, return the button, and let Common UI focus it.
  3. A pushed widget needs setting up first. Push Widget creates and shows it straight away. Call your own setup function on the widget it returns, or in C++ use the AddWidget overload that takes a setup function.

First, check the basics

  • Project Settings > General Settings > Default Classes > Game Viewport Client Class must be CommonGameViewportClient (or a child of it). Without it, Common UI logs that its input routing “will not function correctly”.
  • For Enhanced Input, tick Enable Enhanced Input Support under Project Settings > Common Input Settings, then restart the editor.
  • In your Common UI input data asset, set Enhanced Input Click Action and Enhanced Input Back Action. In the thread, Accept only worked once the classic Default Click Action and Default Back Action were set too, so set both.

WASD navigation

Enhanced Input can trigger actions such as Accept and Back, but it can’t move focus. Focus moves when Slate’s navigation config maps a key to a direction. In 5.8 the default config maps only the arrow keys and the D-pad (plus the left stick).

To add WASD, replace the config once at startup, for example in your Game Instance’s Init:

				
					#include "Framework/Application/NavigationConfig.h"
#include "Framework/Application/SlateApplication.h"

if (FSlateApplication::IsInitialized())
{
	TSharedRef<FNavigationConfig> NavigationConfig = MakeShared<FNavigationConfig>();
	NavigationConfig->KeyEventRules.Emplace(EKeys::W, EUINavigation::Up);
	NavigationConfig->KeyEventRules.Emplace(EKeys::A, EUINavigation::Left);
	NavigationConfig->KeyEventRules.Emplace(EKeys::S, EUINavigation::Down);
	NavigationConfig->KeyEventRules.Emplace(EKeys::D, EUINavigation::Right);
	FSlateApplication::Get().SetNavigationConfig(NavigationConfig);
}
				
			

Add Slate, SlateCore and InputCore to your Build.cs dependencies. The arrow keys and D-pad keep working, because the new config starts from the defaults.

Blueprint only? A forum member’s free plugin, UI Navigation Enhanced (MIT licence), turns the navigation config into a Data Asset you apply from Blueprint. It’s third-party, so check it supports your engine version.

A focused button doesn’t respond to Enter or the gamepad

The forum report: after Set Keyboard Focus or Set User Focus, the Common Button looks focused, but Space or the gamepad button does nothing until you press Up or Down once. Let Common UI apply the focus instead:

  1. Make your menu a Common Activatable Widget.
  2. Override Get Desired Focus Target and return the button that should start focused. Or set Desired Focus Widget under Interaction in the Details panel.
  3. Leave Supports Activation Focus ticked. Tick Auto Restore Focus to return to the last focused button when the menu comes back.
  4. Remove your Set Keyboard Focus calls.

Common UI focuses that target whenever the widget becomes the active one. Its source says widgets “should be built to rely fully on GetDesiredFocusTarget()”.

Pushing an activatable widget you need to set up first

Push Widget takes a class, not an instance. It creates the widget (or reuses a pooled one) and starts switching to it before it returns. Construct has already run by then, and On Activated may have too, depending on the stack’s transition.

  • Blueprint: on the returned widget, set your variables, then call your own Setup function instead of relying on Construct. Pooled widgets can keep old values, so set everything every time.
  • C++: an AddWidget overload takes a setup function that runs after the widget is created and before it’s added. (AddWidgetInstance also exists, but Epic’s comment strongly recommends the class-based version.)
  • Push Content to Layer for Player comes from the CommonGame plugin in Epic’s Lyra sample, not the engine. Its async version gives you a callback before the push.

FAQ

Can I use Enhanced Input actions for UI navigation?

Not to move focus. Navigation reads keys from Slate’s navigation config.

Can I drag and drop a Common Button?

From 5.7, yes, in Common list views, whose rows handle the drag. On a standalone Common Button in 5.8, the drag only starts if something handles the button’s drag detection, which needs C++.

Should I still call Set User Focus?

Not for a menu’s starting focus. Common UI only tolerates manual focus calls for older widgets.

Related articles