profileShare

rasmusjy / voicetask

Read-only snapshot

No repository description.

main default branch 105 files Expires Sep 13, 2026, 9:06 AM

Commit

Stop bot speech with Escape

commit 598f23c

1 changed file with +10 and −0

modified client/src/App.tsx +10 −0
@@ -166,6 +166,16 @@function InterviewScreen({ sessionId, onBack }: { sessionId: string; onBack: ()
166 166 return () => stopSpeaking()
167 167 }, [])
168 168
169 + useEffect(() => {
170 + function handleKeyDown(event: KeyboardEvent) {
171 + if (event.key !== 'Escape') return
172 + stopSpeaking()
173 + setSpeaking(false)
174 + }
175 + window.addEventListener('keydown', handleKeyDown)
176 + return () => window.removeEventListener('keydown', handleKeyDown)
177 + }, [])
178 +
169 179 const handleRecordingChange = useCallback((isRecording: boolean) => {
170 180 setRecording(isRecording)
171 181 if (isRecording) {