Skip to content

Add native streamer app shortcut integration#469

Open
zaloguj12 wants to merge 4 commits into
OpenCloudGaming:devfrom
zaloguj12:dev
Open

Add native streamer app shortcut integration#469
zaloguj12 wants to merge 4 commits into
OpenCloudGaming:devfrom
zaloguj12:dev

Conversation

@zaloguj12
Copy link
Copy Markdown
Contributor

Description

  • pass the existing configurable stream shortcut bindings into the native streamer session context
  • add a native shortcut matcher around the Win32/GStreamer input bridge so app shortcuts are intercepted before being forwarded into the stream
  • route native shortcut actions back through the existing renderer control flow, while keeping native pointer-lock capture toggling local to the streamer window

Verification

  • npm --prefix opennow-stable run typecheck
  • npm --prefix opennow-stable run build
  • cargo test (in native/opennow-streamer)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ec7c564dc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +386 to 389
event_sender: &Option<Sender<Event>>,
events: &[NativeWindowInputEvent],
) {
if events.is_empty() || !input_state.ready.load(Ordering::SeqCst) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Forward local shortcuts before input readiness gating

Native shortcut events are now routed through the same drain path as encoded stream input, but this function returns before looking at NativeWindowInputEvent::Shortcut whenever the GFN input handshake/data channels are not ready. In the native window during connecting/reconnect/failure states, local controls such as stop stream, fullscreen, stats, screenshot, or recording do not need the input channel, yet those keypresses are silently dropped instead of being sent through event_sender. Handle Shortcut events before the ready check (or exempt them from it) so native app controls remain available while the stream input path is unavailable.

Useful? React with 👍 / 👎.

sessionId: activeSession.sessionId,
signalingServer: activeSession.signalingServer,
signalingUrl: activeSession.signalingUrl,
nativeStreamer: buildNativeStreamerSessionContext(activeSession, streamSettings, nativeStreamerShortcuts),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Propagate shortcut edits during active native sessions

The native process only receives these bindings in the initial signaling connect context, but the stream UI lets users change screenshot/recording shortcuts while a session is already active (onScreenshotShortcutChange/onRecordingShortcutChange update settings live). In that scenario the renderer starts honoring the new key immediately, while the native window keeps intercepting only the old binding until the next reconnect, so shortcuts appear broken specifically after in-session edits. Add an update command or otherwise refresh the native matcher when these settings change during a native stream.

Useful? React with 👍 / 👎.

}
}
}
_ => emit_input_event(NativeWindowInputEvent::Shortcut { action }),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Suppress duplicate DOM handling for native shortcuts

When the native renderer window is focused on Windows, keyboard raw input is registered without RIDEV_NOLEGACY for the keyboard and non-Escape key messages are still passed to the original window proc, so the renderer's existing keydown shortcut handlers can run in addition to this newly emitted native shortcut. That makes actions fire twice in native sessions (for example F3 toggles stats off again, and F12 can start and immediately stop recording). Either consume the matching legacy key message or avoid emitting the native shortcut when the DOM handler will already see it.

Useful? React with 👍 / 👎.

@capy-ai
Copy link
Copy Markdown
Contributor

capy-ai Bot commented May 17, 2026

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@zaloguj12
Copy link
Copy Markdown
Contributor Author

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

son?

@zortos293
Copy link
Copy Markdown
Collaborator

@zaloguj12 will look into this ;)

@zortos293
Copy link
Copy Markdown
Collaborator

can you fix codex issues

@zaloguj12
Copy link
Copy Markdown
Contributor Author

i will try when i get home

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.

2 participants