feat: comprehensive keyboard shortcuts for roundtable (T/V/Esc/Space/M/S/C)#256
Merged
wyuc merged 1 commit intoTHU-MAIC:mainfrom Mar 25, 2026
Merged
Conversation
50f4896 to
00287d9
Compare
870ee02 to
05c0380
Compare
05c0380 to
36ff5fd
Compare
roundtable/index.tsx: - T: toggle text input box (calls handleToggleInput) - V: toggle voice input (calls handleToggleVoice, gated on asrEnabled) - Escape: dismiss open input/voice panels + cancel recording - Space: discussion pause/resume (existing, now part of unified handler) - All shortcuts guarded against input/textarea/contentEditable focus stage.tsx: - Space (lecture play/pause) now works outside presentation mode - Arrow keys remain presentation-only to avoid scroll interference Closes THU-MAIC#255
36ff5fd to
07af7ff
Compare
Contributor
Author
|
Small addition not reflected in the description:
Will update the PR description if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds comprehensive keyboard shortcuts for the roundtable to improve interaction speed, especially during live discussions where clicking small UI elements is inconvenient.
Closes #255
Shortcuts
Core (roundtable/index.tsx)
TVasrEnabled; busyRef prevents rapid-fireEscapeStage-level (stage.tsx)
SpaceEscapeMSCChanges
components/roundtable/index.tsxT→handleToggleInput(),V→handleToggleVoice()useEffectafteruseAudioRecorder/handleToggleVoicedeclarationscomponents/stage.tsxnavigator.keyboard.lock(['Escape'])) prevents browser from auto-exiting fullscreen; our handler decides: panels open → roundtable closes them, no panels → exit fullscreenlib/hooks/use-audio-recorder.tsbusyRefsynchronous lock to prevent rapid V press from creating duplicate SpeechRecognition instancesabortederror inonerrorhandlerTesting
T→ opens text input.Tagain → closes. Typing in input:Ttypes normallyV→ starts voice recording.Vagain → stops. Rapid V press: no errorEscape→ closes any open panel (works from within text input too)Escapein fullscreen with panels open → closes panels only (no fullscreen exit)Escapein fullscreen with no panels → exits fullscreenSpace→ play/pause lecture from normal view (not just presentation)M→ toggles TTS muteS→ toggles sidebar (non-fullscreen)C→ toggles chat panel (non-fullscreen)