Add native streamer app shortcut integration#469
Conversation
There was a problem hiding this comment.
💡 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".
| event_sender: &Option<Sender<Event>>, | ||
| events: &[NativeWindowInputEvent], | ||
| ) { | ||
| if events.is_empty() || !input_state.ready.load(Ordering::SeqCst) { |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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 }), |
There was a problem hiding this comment.
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 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? |
|
@zaloguj12 will look into this ;) |
|
can you fix codex issues |
|
i will try when i get home |
Description
Verification
npm --prefix opennow-stable run typechecknpm --prefix opennow-stable run buildcargo test(innative/opennow-streamer)