Skip to content

Gamepads: keep the capture and Guide buttons of a controller assigned to another session out of the console - #72

Open
mlopezsegura wants to merge 2 commits into
masterfrom
fix/gamepad-capture-button
Open

mlopezsegura wants to merge 2 commits into
masterfrom
fix/gamepad-capture-button

Conversation

@mlopezsegura

@mlopezsegura mlopezsegura commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

With a physical controller assigned to a stream session (or a seat), its capture and Guide buttons still acted on the console session.

Capture button. Some controllers (GameSir, 8BitDo…) expose a HID keyboard on another interface of the same USB device and the capture button sends keystrokes through it. Seen with a GameSir in Xbox 360 mode (VID_3537&PID_1040): MI_00 is the XUSB pad, MI_01 a keyboard + consumer control. Isolation only jailed the pad node and its descendants in HidHide, and Windows routes physical keyboards to the console from the kernel, where HidHide doesn't reach.

  • GamepadSessionIsolation.SyncSideInputs: while a physical pad goes to a session other than the console, the keyboard/mouse interfaces of its USB device (UsbCapture.FindTargets) are switched to WinUSB with UsbCapture, which journals the change so a crash is undone on the next start. They go back to their driver when the pad returns to the console, and when the service stops. Interfaces a seat already captured are left alone (UsbCapture.IsCaptured).
  • The capture button does nothing in the remote session for now (it never reached it before either).

Guide button. Windows reads it from a system service, outside HidHide, and opens the Game Bar in every session. GuideButtonGuard (UseNexusForGameBarEnabled = 0) was only engaged by running seats.

  • GamepadSessionIsolation.SyncGuideButton engages it too while a physical pad is assigned to a stream session, for that session's user and the console user, and releases it when the assignment ends or the service stops. It's reference-counted, so it coexists with seats.

Builds; 117 tests pass. Not yet tested on hardware.

🤖 Generated with Claude Code

mlopezsegura and others added 2 commits November 17, 2026 19:59
…tra sesión

Algunos mandos (GameSir, 8BitDo...) traen en el mismo USB una interfaz de
teclado: el botón de captura manda teclas por ahí. Windows lleva los teclados
físicos a la consola desde el kernel, donde HidHide no llega, así que con el
mando asignado a otra sesión la captura saltaba en la consola. Mientras el
mando va a otra sesión, esa interfaz pasa a WinUSB con UsbCapture (con su
registro en disco) y vuelve a su driver cuando el mando vuelve a la consola.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GuideButtonGuard solo se activaba con puestos encendidos. Con un mando
físico asignado a una sesión de stream, el botón Guía seguía abriendo la
Game Bar en la consola (Windows lo lee desde un servicio del sistema, fuera
de HidHide). Ahora se apaga para el usuario de esa sesión y el de la consola
mientras dure la asignación.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mlopezsegura mlopezsegura changed the title Gamepads: keep a controller's keyboard interface (capture button) out of the console when assigned to another session Gamepads: keep the capture and Guide buttons of a controller assigned to another session out of the console Nov 17, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant