# Debug to show where focus currently is?

**URL:** <https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** unreal-engine, UE4-27\
**Created:** [March 10, 2022, 3:22am UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517 "2022-03-10T03:22:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [March 10, 2022, 3:22am UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/1 "2022-03-10T03:22:33Z")

</div>

Is there a way to tell where focus currently is (during runtime)? Like if it’s on a specific widget or somewhere else. Just for debug purposes. Thanks for any help.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 10, 2022, 1:12pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/2 "2022-03-10T13:12:54Z")

</div>

Do you mean what the camera is pointing at? Then it would be a line trace…

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [March 10, 2022, 1:20pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/3 "2022-03-10T13:20:26Z")

</div>

You could override this - ideally in the parent class so you do not need to add it manually - and call a dispatcher:

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/0/2/802c2394cda95d9422784633e0928559891e3b4e.png)

And then:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/b/0bb46f94ae714cc38346099675bb5393b112f044.png)

edit: untick `Top Level Only`

* * *

Perhaps you could even skip the dispatcher bit and just receive a notification in `onFocusReceived` / `Lost` inside the widget. Not sure where you want that trigger - hence the suggestion to use a dispatcher.

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [March 10, 2022, 1:30pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/4 "2022-03-10T13:30:56Z")

</div>

thank you!

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [March 10, 2022, 3:38pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/5 "2022-03-10T15:38:08Z")

</div>

Given that he says “widget,” I think he means “which GUI widget has the current keyboard focus.”

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [March 10, 2022, 5:20pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/6 "2022-03-10T17:20:43Z")

</div>

Yes, I realise that now… Didn’t see the word widget on the first read…

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [March 10, 2022, 5:40pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/7 "2022-03-10T17:40:14Z")

</div>

Yes thats it. I had some widget grabbing focus but couldnt figure out who it was. I figured there may be faster way to know then filtering through individual parts of a widget one by one.

In actuality though, the problem was that when changing to Game and UI only input, I wasn’t setting which widget to focus to (just one of those dumb simple things, forgetting to connect a noodle). I dunno what it was actually doing, but the result was that my tab key (used to toggle the widget) would get focused on something and not allow it to toggle correctly.

---

<div class="post-metadata">

**Author:** ![gtreshchev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gtreshchev/32/1075419_2.png) [@gtreshchev](https://forums.unrealengine.com/u/gtreshchev)\
**Post date:** [March 24, 2024, 9:49pm UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/8 "2024-03-24T21:49:30Z")

</div>

This is what you could also try, just in case: [How to get the currently focused widget in Unreal Engine | Georgy's Tech Blog](https://georgy.dev/posts/get-focused-widget/)

---

<div class="post-metadata">

**Author:** ![Raktou](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raktou](https://forums.unrealengine.com/u/Raktou)\
**Post date:** [May 21, 2025, 1:13am UTC](https://forums.unrealengine.com/t/debug-to-show-where-focus-currently-is/505517/9 "2025-05-21T01:13:55Z")

</div>

Hey! Following @Everynone 's solution I’ve made a lazier one where you don’t have to go through all widgets creating dispatchers) and it shows the widget path if that’s of any help.

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

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/a/d9ae2bce89c134b62367deba7bbbed74c19f1112.png)
