Skip to content

Add session fullscreen shortcut and auto-toggle on connection#307

Merged
zortos293 merged 1 commit intodevfrom
capy/session-fullscreen-shortcut
Apr 14, 2026
Merged

Add session fullscreen shortcut and auto-toggle on connection#307
zortos293 merged 1 commit intodevfrom
capy/session-fullscreen-shortcut

Conversation

@zortos293
Copy link
Copy Markdown
Collaborator

@zortos293 zortos293 commented Apr 14, 2026

This PR adds a configurable fullscreen shortcut that works only while in an active session and fixes auto-fullscreen to enter when connecting rather than only on pointer lock.

Settings & Persistence:

  • Added shortcutToggleFullscreen to shared and main settings interfaces with default F10.
  • Added to DEFAULT_SHORTCUTS in renderer and defaults in SettingsPage.

Renderer Behavior:

  • Introduced setSessionFullscreen/toggleSessionFullscreen helpers that unify HTML fullscreen requests with native window fullscreen sync (via window.openNow.setFullscreen). Used by pointer-lock auto-fullscreen, main-process events, manual toggle, and the new auto-connect effect.
  • Added toggleFullscreen to the global keydown handler, gated to streamStatus === "connecting" || "streaming" with prevent/stop/stopImmediatePropagation like other session shortcuts.
  • Added auto-fullscreen effect that enters fullscreen once when transitioning to connecting or streaming, guarded by autoFullscreenRequestedRef to avoid repeated calls.
  • Removed the late-in-stream auto-fullscreen code from the signaling offer handler; it now happens earlier via the connection effect.
  • Passed toggleFullscreen into StreamView.shortcuts prop and added a "Full screen" hint to the on-screen shortcuts overlay.

Settings Page:

  • Added local state (toggleFullscreenInput, toggleFullscreenError) with effect sync.
  • Added validation/capture/reset logic in handleShortcutBlur, applyShortcutCapture, handleShortcutPaste, handleShortcutCaptureKeyDown, areShortcutsDefault, handleResetShortcuts.
  • Added a new shortcut row labeled "Toggle Full Screen" with full binding/blur/paste/capture handling.
  • Updated the error aggregation and hint text to include the fullscreen shortcut example.
  • Updated the autoFullScreen hint to: "Automatically enter fullscreen when connecting to or starting a session."

Main Process:

  • Removed startup auto-fullscreen initialization (the old behavior that forced fullscreen on app launch if enabled).
  • Removed the autoFullScreen settings-change handler that immediately toggled native fullscreen; fullscreen is now driven by renderer session logic.

Open in Capy OPE-63 · 5.4

@zortos293 zortos293 added the capy Generated by capy.ai label Apr 14, 2026 — with Capy AI
@zortos293 zortos293 merged commit 6ef93ab into dev Apr 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant