Game Only mode with UMG?

My game basically has two modes - (Set Input Mode Game Only) and (Set Input Mode UIOnly). Almost everything works when I do the following. With UIOnly, user can navigate the UMG menus. With Game, user can click (or tap) actors and send keyboard input. However, I want to allow user to click a UMG “Back” button when we’re in (Set Input Mode Game Only).

Here’s my use case… For desktop (eg Windows), the user presses Esc key to exit Game mode. But for mobile (eg Android), we don’t want to assume the user has a keyboard, so I need to add a “Back”.

I tried (Set Input Mode Game and UI), but it does not work. Mouse clicks and keyboard input work, but I can’t click the UMG “Back” button. Weirdly enough, if I do keyboard (Tab Tab Space) then I can activate the UMG “Back” button… But I am unable to activate the UMG “Back” button with a mouse click in (Set Input Mode Game and UI).

Basically what I want is a “Game” mode that does the following. If user clicks on a UMG button, then that UMG button gets the click. If user clicks anywhere else, then that click gets passed to the Game so that it does the same thing as if we were in (Set Input Mode Game Only) (eg user can click on actors). For keyboard input, I’d like it to do exactly the same thing as (Set Input Mode Game Only) - so don’t let the UMG steal any of the keyboard input.

Update: Oops. I was setting the canvas panel’s visibility to Hit Test Invisible. Setting it to Visible fixed the problem. Although now I have a different problem… UMG captures keyboard arrow keys input. That’s fine in UIOnly mode, but for Game and UI mode, I want all keyboard input to go to the Game (not the UI/UMG).

The following helped. In Designer, I set my UMG “Back” button’s Is Focusable is false. When changing modes to Game and UI (instead of UIOnly), I now call Set Focus to Game Viewport. The button’s OnPressed and OnReleased also call Set Focus to Game Viewport, so that when the user does mouse press on the button then mouse-release elsewhere, our focus on the viewport doesn’t get lost (aside to me this seems like a UMG bug - I mean it’s Is Focusable is false, yet I can still lose focus on Game Viewport in this way?).