Pixel Streaming Keyboard Focus: When Typing Does Nothing

Pixel Streaming Keyboard Focus: When Typing Does Nothing

Typing not reaching your embedded Unreal app? Keyboard focus sits with the wrong frame. Here are the four fixes and how to tell which one you need.

Rafshan TashinRafshan Tashin

December 4, 2026

5 min read

Pixel streaming keyboard focus explains one of the strangest bug reports an embedded stream produces: the mouse works, the app responds to clicks, and not a single keystroke arrives. Nothing is broken. The keys are going somewhere else.

Why the mouse works and the keyboard does not

The two inputs follow different rules. Mouse input goes to whatever sits under the pointer, while keyboard input goes to the focused frame. Each <iframe> is its own browsing context and only one is focused at a time, so when the stream's frame lacks focus the player never sees your visitor's typing. (Keyboard focus)

That is why opening a stream in its own tab never has this problem. A tab always has focus. Inside an iframe, your page starts with focus and the stream has to be given it.

What takes focus away

Ordinary page interactions, all of them:

  • Clicking any button, link or menu on your page
  • Typing in a search, name or chat field
  • Choosing from a dropdown, such as a quality or microphone selector
  • Closing one of your own dialogs
  • Loading the page before the visitor has clicked the stream

The four fixes

Click the stream. This works automatically. Older player builds could fail here because nothing in the video area was focusable, but both causes are fixed, so update the build if clicking does nothing.

Return focus after page clicks. Add a click listener on the body that calls frame.focus(). Skip targets that are input, select, textarea or label, or your visitors will not be able to type into your own fields.

Return focus after a control acts. In a button's click handler, call frame.focus() inside a setTimeout(..., 0) once the handler's work is done. This is the one for microphone pickers, quality selectors and fullscreen toggles.

Focus on load. Call frame.focus() after the frame's load event, again with a setTimeout of 0. Use it carefully if visitors need to fill in a form first.

One constraint shapes all of this: a frame cannot take focus back from the page containing it, because browsers block that for security. Your page has to make the decision.

Which fix does your page need?

Your pageAdd
Stream onlyNothing
Buttons beside the streamFix 3
Controls, panels or menusFix 2
Forms visitors type intoFix 2, tested on every field
Stream is the first thing usedFix 4 as well

Tell your visitors, or handle it silently

A built-in notice covers the first option. Turn on showFocusNotice in Control Panel → your application → UI → Keyboard Focus Notice, which is off by default. An amber notice then appears whenever the stream lacks focus; clicking it restores focus, turns it green and fades it away.

For silent handling, listen for the focus events, which fire whether or not the notice is on. In an iframe they arrive as window message events with msg.type of streamFocusLost or streamFocusGained, and the data may be a string you need to parse or an object. With the Web SDK, use e3ds_controller.callbacks.onStreamFocusLost and onStreamFocusGained.

Mobile needs the notice rather than the silent route. Tapping the picture does not take focus on phones and tablets, so make your banner the tap target and call frame.focus() from its handler.

Diagnosing it in thirty seconds

Run document.getElementById("stream").focus() in the page console, then type without clicking anything. If the app responds, focus was the cause.

For the other direction, run document.activeElement, which MDN defines as the element receiving keyboard events such as keydown and keyup. If it reports one of your own controls instead of the iframe, the keys are going to your page.

Two symptoms are not focus problems at all. Typing that works while push-to-talk does not is a microphone issue, covered in our microphone setup guide. And a phone with no keyboard attached has no keystrokes to lose, so it only matters with a Bluetooth or on-screen keyboard.

The Web SDK sidesteps the frame

With the Web SDK there is no frame at all. The video element sits in your own document, so normal page focus rules apply. Keystrokes typed into your text fields still belong to those fields, which means you face the same design decision as Fix 3, just without an iframe in the way. Our comparison of iframe vs Web SDK covers the wider trade-off.

FAQs

Why does my mouse work but my keyboard does nothing?

The stream's frame does not have focus, and keyboard input follows focus rather than the pointer. (Keyboard focus)

Can the stream grab focus back by itself?

No. Browsers block a frame from taking focus from its parent page.

Why does typing stop after I use a control on my page?

Focus moved to that control. Returning it after the handler runs fixes it.

Does this affect the Web SDK?

Not in the same way, because there is no frame.

Why does tapping the stream not work on a phone?

Tapping the picture does not take focus on mobile. Use the notice as the tap target.

Conclusion

Pixel streaming keyboard focus is a browser rule, not a platform fault. Decide where focus belongs after each interaction on your page, return it to the frame when the stream should be receiving keys, and turn on the notice so visitors are never left guessing.

Embedding a stream in your own page? Book a demo meeting and we'll look at your setup.

Need help? support@eagle3dstreaming.com · Discord

Sources


Share this article