Skip to content

[Fix] Console mode control QoL Fixes like Gate launch cancel hold, add close combo - #5863

Open
Drackrath wants to merge 5 commits into
Heroic-Games-Launcher:mainfrom
Drackrath:fix/steam-controls-close-game
Open

Drackrath wants to merge 5 commits into
Heroic-Games-Launcher:mainfrom
Drackrath:fix/steam-controls-close-game

Conversation

@Drackrath

@Drackrath Drackrath commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes: #5520
Fixes: #5577
Fixes: #5541

Note:

Changed Close-Combo to View + R2
This should be possible to edit for the user in the future. Seperate PR

Starting Console mode now is also: View + R2 for 3s

Focuses Heroic with: View + R2 on Wayland & KDE Desktops

Hardened Disabled control options in console mode. Now only View + R2 works (close)

Added override config option in Settings.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@Drackrath Drackrath changed the title [Fix] Gate launch cancel hold, add close combo [Fix] Console mode control QoL Fixes like Gate launch cancel hold, add close combo Sep 1, 2026
…in consolemode, harden disabled control options
@Drackrath
Drackrath marked this pull request as ready for review September 1, 2026 23:56
@Drackrath
Drackrath requested a review from a team as a code owner September 1, 2026 23:56

@flavioislima flavioislima left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, the hold-to-quit and launch cancel gating are a clear improvement. Three things I'd like addressed before merging, see inline.

useGamepadComboHold([BTN_SELECT, BTN_R2], (held) => {
if (held) {
// Surface Heroic during the countdown
window.api.focusMainWindow()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This listener is mounted at the root for the whole non-console app and fires focusMainWindow on the very first frame View+R2 is seen, not after the 3s hold. When a game was launched from the normal Library and Heroic is in the background, a momentary View tap while holding RT (common for map/aim in many games) will restore/show/focus Heroic over the fullscreen game, and on Plasma Wayland force-activate it via KWin.

gamepad.ts already gates its own input handling on isFocused for exactly this reason (Chromium keeps delivering gamepad state to unfocused windows). useGamepadComboHold has no such gate, so please either require document.hasFocus() / the existing focus flag before starting the hold, or only call focusMainWindow once the hold actually completes.

const comboKey = buttonIndices.join(',')

useEffect(() => {
if (!enabled) return

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useGamepadButtonPress and useGamepadButtonHold were updated to respect isControllerNavDisabled(), but useGamepadComboHold and isGamepadButtonHeld don't check it. With disableController=true and the new setting off, A/B/L1/R1/R2 are correctly dead but View+RT still enters console mode from anywhere, quits console mode, and kills a playing game via the LaunchOverlay combo. Same guard as the sibling hooks should be enough.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Idea behind this, was to still allow the console-mode even if controller Navigation is disabled. Argueably this does not navigate here, and still enables Console-Mode, which also has Controller support enabled by default. This would drop my intended behaviour.... Do we still apply it your way?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also put that in a condition that if the controller is enabled by default in console-mode, this would also enable the start of console-mode with the View+RT, and if it's off, it wouldn't

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, makes sense then lets keep as it is.

}

// KWin denies focus stealing on Wayland
export async function kwinActivateWindow(caption: string): Promise<void> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fallback can't work in the Flatpak build, which is the main Plasma Wayland / Steam Deck desktop target it's aimed at: qdbus/qdbus6 are exec'd inside the sandbox (the runtime is org.freedesktop.Platform, no qdbus, so ENOENT), the manifest has no --talk-name=org.kde.KWin, and the script is written to sandbox-private temp that host KWin can't read. Both spawns fail, main.ts swallows the error, and nothing is logged.

It would need flatpak-spawn --host plus the D-Bus permission and a host-visible script path, or alternatively just skip the fallback when running in Flatpak and log that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather just log it, as I do not use flatpak at all, and I have little incentive for the use of flatpak builds...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok add a TODO and check if flatpak you log it.

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

Labels

None yet

Projects

None yet

2 participants