From 19e97cfc92dfe305737e2b0e2c37a829ae36937e Mon Sep 17 00:00:00 2001 From: Ju Date: Mon, 13 Jul 2026 04:00:10 +0000 Subject: [PATCH 1/2] feat: configure WebRTCClient with signaling URL --- src/components/panels/MosaicDashboard.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/panels/MosaicDashboard.tsx b/src/components/panels/MosaicDashboard.tsx index 5798fdb..884e02e 100644 --- a/src/components/panels/MosaicDashboard.tsx +++ b/src/components/panels/MosaicDashboard.tsx @@ -422,7 +422,9 @@ const MosaicDashboard: React.FC = () => { case 'webRTCClient': return( - + ); From 29ef3250e9a727a23e095c9191e9e05b8182db05 Mon Sep 17 00:00:00 2001 From: Ju Date: Mon, 13 Jul 2026 17:56:47 +0000 Subject: [PATCH 2/2] feat: add keyboard shortcut for snapshot functionality --- src/components/panels/VideoControls.tsx | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/components/panels/VideoControls.tsx b/src/components/panels/VideoControls.tsx index a830969..ca1c735 100644 --- a/src/components/panels/VideoControls.tsx +++ b/src/components/panels/VideoControls.tsx @@ -1,5 +1,5 @@ 'use client'; -import React from "react"; +import React, { useEffect } from "react"; import VideoCustomPresetForm from "../VideoCustomPresetForm"; import ROSLIB from "roslib"; import { useROS } from "@/ros/ROSContext"; @@ -156,6 +156,30 @@ const VideoControls: React.FC = () => { }; const connected = !!ros && rosStatus === "connected"; + // Shift + s for snapshot + useEffect(() => { + const handleKeyDown = (event: KeyboardEvent) => { + const isSnapshotShortcut = + event.shiftKey && event.key.toLowerCase() === "s"; + + if (!isSnapshotShortcut) return; + if (event.repeat) return; + + const target = event.target as HTMLElement | null; + const isEditableTarget = + target instanceof HTMLInputElement || + target instanceof HTMLTextAreaElement || + !!target?.isContentEditable; + + if (isEditableTarget || !connected) return; + + event.preventDefault(); + onSnapshot(); + }; + + document.addEventListener("keydown", handleKeyDown); + return () => document.removeEventListener("keydown", handleKeyDown); + }, [connected]); const buttonStyle = (enabled: boolean) => ({ border: "1px solid #444",