Making Shift+Tab Work: Shipping the Steam Overlay in a Web-Powered Game
If you play games on Steam, Shift+Tab is muscle memory: friends list, chat, screenshots, the wishlist button — all without leaving the game. In our early demo builds, pressing Shift+Tab did... absolutely nothing. This is the story of why, the slightly absurd trick that fixed it, and the museum of black screens we toured along the way. And because other developers keep hitting the same wall, we've open-sourced the whole solution.
Here's the finished result — the overlay opening over Spirefall, captured in OBS like any native game:
Why the overlay ignores games like ours
Spirefall's interface is built with web technology running inside a light native shell. It's a fantastic way to build a card game — the same UI powers our desktop demo, the playtest client in your browser, and this very website — but it has one sneaky consequence on Steam.
Steam's overlay works by injecting itself into the game's process and grabbing the moment the game presents a frame to the GPU: "before this frame hits the screen, let me paint my UI on top." Native games present frames from their own process thousands of times a minute, so the overlay always finds its hook.
Our game never presents a single frame from its own process. The web engine renders everything in separate helper processes, and Windows composites the result. Steam injects, waits for a frame that never comes, and the overlay silently gives up. Pressing Shift+Tab does nothing — the norm for webview-shell games.
The trick: give Steam a decoy
If Steam needs a swapchain to hook, give it one.
We create an invisible window stretched exactly over the game, and a dedicated thread presents completely transparent frames into it at 60 frames per second — a real GPU swapchain doing real presents of nothing at all. Steam's injected hook finds it and happily composites its overlay into those empty frames. The game stays visible through every pixel Steam doesn't touch.
One more wrinkle: the Shift+Tab keypress itself lands in the web engine's process, where Steam's input hooks never see it. So the UI catches the chord and forwards it to Steam explicitly. Press Shift+Tab, Steam paints its panels into the decoy, and it looks exactly like the overlay in any native game.
A short museum of black screens
Getting from "clever idea" to "shipped" was a parade of failure modes, each one teaching us an invariant the final version obeys:
- The overlay opened into a corner. The decoy window is born at a default 800×600 before it snaps to the game's size — and the GPU clamps the swapchain to the size the window actually has. Steam rendered the whole overlay into the top-left corner of the screen.
- Closing the overlay left the screen black. After the overlay activates once, Steam paints opaque frames into the decoy forever. Leave the decoy visible after close and it's a solid black sheet over the game. The sheet may only exist while the overlay is open.
- Alt-tab started a fight. When the overlay opens, Steam's own invisible input window takes the foreground. Our focus logic read that as "player alt-tabbed away," hid the decoy, Steam grabbed it back — a show/hide fight that locked the game out entirely.
- OBS captured pure black. We initially marked the decoy "exclude from capture" for privacy. Capture tools don't remove an excluded window — they render it as opaque black. Every stream and screenshot went dark the moment the sheet appeared.
- A ghost of the game haunted our captures. While the overlay is open we freeze a snapshot of the game as a backdrop, so Steam dims a real game frame instead of black — but for one build, a faint frozen frame lingered in captures after the overlay closed. The backdrop now vanishes the instant the overlay does.
- The keyboard needs a wake-up click. After alt-tabbing back into the game, Shift+Tab plays dead until you click the screen once — Windows re-activates the native window without handing keyboard focus back to the web engine inside it, so every keypress vanishes. Our first fix — explicitly refocusing the webview whenever the game regains the foreground — turned out to kill Shift+Tab entirely, so we reverted it. For now this one stands as a known quirk: one click after alt-tab and you're back.
Every one of those was diagnosed live, with the game running, OBS recording, and a lot of staring at logs. The final version is boring in the best way: open, close, alt-tab, resize, stream — it all just works.
We open-sourced it
None of this is specific to our game, and webview-shell games are becoming common — so we extracted the whole mechanism into a reusable, MIT-licensed plugin for Tauri, the shell Spirefall ships in:
github.com/PSG-Team/tauri-steam-overlay-surface
The repo has the full technique writeup, every hard-won invariant documented in place, and a runnable example against Valve's public test app — if you have Steam installed, you can see the overlay working in a webview game in about a minute. If you're shipping a web-powered game on Steam, take it; if you improve it, we'd love the pull request.
Shift+Tab works. Wishlist away.