# Keyboard and gamepad navigation in scroll box

**URL:** <https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469>\
**Category:** UI\
**Tags:** unreal-engine, bug-report, question, UMG\
**Created:** [November 24, 2017, 10:02am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469 "2017-11-24T10:02:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![simco50](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@simco50](https://forums.unrealengine.com/u/simco50)\
**Post date:** [November 24, 2017, 10:02am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/1 "2017-11-24T10:02:59Z")

</div>

Hello,

## I’ve been trying to find a solution for being able to have proper keyboard navigation using a scroll box. In the current state, the scroll box only supports the simplest way of navigation. From the moment nested focusable widgets are involved, the implementation completely breaks.

**A simple example** :

1. Make a scroll box containing a few vertical boxes.
2. Add buttons to all vertical boxes.
3. Press play and notice you can’t navigate between the buttons in the vertical box

**Expected result:** You would navigate between the buttons and when reaching the end, the scroll box should scroll

**Actual result:** The logic in OnNavigation fails that results in not being to navigate any further than what is visible on screen.

* * *

This happens not only using vertical/horizontal boxes. Whenever focusable objects are one level deeper than the direct children of the scroll box, it fails to navigate.

In the OnNavigation method in SScrollBox.cpp, it iterates through the children until it finds something focusable and focuses that. Because horizontal boxes are not focusable, the keyboard focus gets destroyed.  
It should instead do a recursive search within the children but after experimenting with this, it wasn’t a good solution.

Does anyone have experience with this or found a way to get around this?  
Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d327ec62](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d327ec62](https://forums.unrealengine.com/u/anonymous_user_d327ec62)\
**Post date:** [February 12, 2018, 9:58pm UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/2 "2018-02-12T21:58:50Z")

</div>

This problem still exist. Does anyone have a solution for this?

---

<div class="post-metadata">

**Author:** ![ellocator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ellocator](https://forums.unrealengine.com/u/ellocator)\
**Post date:** [February 14, 2018, 11:42am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/3 "2018-02-14T11:42:25Z")

</div>

The worst part is, that it already completely breaks when you use a WrapBox inside the ScrollBox (The most common scenario in any game: Navigating a list of items).

---

<div class="post-metadata">

**Author:** ![Raptagon\_Studios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raptagon\_Studios](https://forums.unrealengine.com/u/Raptagon_Studios)\
**Post date:** [January 2, 2019, 10:22pm UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/4 "2019-01-02T22:22:25Z")

</div>

We are looking for an answer on this one as well.

---

<div class="post-metadata">

**Author:** ![DesertEagle\_PWN](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DesertEagle\_PWN](https://forums.unrealengine.com/u/DesertEagle_PWN)\
**Post date:** [February 21, 2019, 3:49am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/5 "2019-02-21T03:49:18Z")

</div>

I am also looking for a solution to this problem in 4.21.1.

Even explicit navigation rule pointing to elements within a ScrollBox are not recognized. A workaround or fix for this issue would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![DF\_Chad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DF\_Chad](https://forums.unrealengine.com/u/DF_Chad)\
**Post date:** [February 22, 2019, 2:58am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/6 "2019-02-22T02:58:14Z")

</div>

I had some success calling ScrollWidgetIntoView on the scrollbox when the focused widget receives focus on navigation. I’m also using a higher NavigationScrollPadding on the scrollbox. If the element received focus via a mouse click I don’t call ScrollWidgetIntoView, only calling it if the focus came from a keyboard or gamepad navigation.

---

<div class="post-metadata">

**Author:** ![ellocator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ellocator](https://forums.unrealengine.com/u/ellocator)\
**Post date:** [February 22, 2019, 9:02am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/7 "2019-02-22T09:02:07Z")

</div>

We also use ScrollWidgetIntoView but have to use the Center mode, because unreal is not able to navigate to elements outside the view. With Center you guarantee that the element above and below is in the view and can be navigated to.

---

<div class="post-metadata">

**Author:** ![RUAA\_A](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RUAA\_A](https://forums.unrealengine.com/u/RUAA_A)\
**Post date:** [October 26, 2022, 7:22am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/8 "2022-10-26T07:22:59Z")

</div>

Guys, try to put those ScrollBox’s contents into one VerticalBox(or other container box), make sure ScrollBox only has 1 child, then you can put your contents in that child, the navigation works fine inside the ScrollBox. Hope this help!

Code position: SScrollBox::OnNavigation

---

<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:** [March 24, 2023, 3:29am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/9 "2023-03-24T03:29:05Z")

</div>

It’s 6 years later on UE5.1.1.

We have Nanite but not this.

> [Widget navigation (arrow keys) unreliable? - #15 by Roy\_Wierer.Seda145](https://forums.unrealengine.com/t/widget-navigation-arrow-keys-unreliable/581135/15)

---

<div class="post-metadata">

**Author:** ![RubberPinecone](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RubberPinecone](https://forums.unrealengine.com/u/RubberPinecone)\
**Post date:** [March 25, 2023, 5:56am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/10 "2023-03-25T05:56:47Z")

</div>

Not sure if this will help anyone, but I wound up on this topic because I couldn’t even get keyboard controls to navigate a Scrollbox + Wrapbox

and this was amongst the only things that came up in my search results, which is why I’m posting this here in case what I found helps other people who are doing the same searches.

What wound up working for me was changing “scroll when focus changes” setting on the scrollbox. Which appears\* at least in my novice level testing to get both keyboard && gamepad navigation working with wrapboxes nested inside scrollboxes.

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

---

<div class="post-metadata">

**Author:** ![LCDLV](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/lcdlv/32/756912_2.png) [@LCDLV](https://forums.unrealengine.com/u/LCDLV)\
**Post date:** [March 3, 2024, 7:06pm UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/11 "2024-03-03T19:06:25Z")

</div>

Hi! I found the solution: Just Set Navigation Destination to CENTER.  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/2/5a27772c4403d62719d4c0bf4ae9bfb6b1c5282e.png)

---

<div class="post-metadata">

**Author:** ![MachineAngels](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MachineAngels](https://forums.unrealengine.com/u/MachineAngels)\
**Post date:** [August 26, 2024, 5:39am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/12 "2024-08-26T05:39:38Z")

</div>

To add onto both [@RubberPinecone](https://dev.epicgames.com/community/api/user_profiles/tab-redirect/about?discourse_username=RubberPinecone) and [eAsociety](https://dev.epicgames.com/community/api/user_profiles/tab-redirect/about?discourse_username=LCDLV)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/c/f/4cf9b1055cb80b6d6f184a61a1fa76b34a1d6271.png)

Have Navigation Destination set to **Center** , and scroll when focus changes to **Instant Scroll**. It will work like a charm!

---

<div class="post-metadata">

**Author:** ![Autogenius](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Autogenius](https://forums.unrealengine.com/u/Autogenius)\
**Post date:** [September 12, 2025, 12:04am UTC](https://forums.unrealengine.com/t/keyboard-and-gamepad-navigation-in-scroll-box/410469/13 "2025-09-12T00:04:56Z")

</div>

Hi just posting my solution here (I’m using a VR controller thumbstick, but it may be applicable for regular gamepads):

1. Create a new InputActionBluprint (mine is called IA\_UI\_Scroll) \> Set it’s value to Axis1D

2. In your existing InputMappingContext (mine is called IMC\_Default), add the IA\_UI\_Scroll in it as a Mapping, then set IA\_UI\_Scroll’s key value to whatever thumbstick you want to scroll with (mine is Oculus Touch (R) Thumbstick Y-Axis).

3. Then in your VRPawn or Controller, add a WidgetInteractionComponent (mine is called ScrollWidgetInteraction) and set it’s Interaction Source to “Center Screen” and EnableHitTesting to True.

4. Then just follow my blueprints. The .25 is just creating a deadzone for less issues, but it should be optional. 40 is a multiplier for the scroll.

 ![Screenshot 2025-09-11 165147](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/9/ec9891fd35905e2bc1ad77a62c228e0bc098ef46.png)
