Draft
Conversation
Surgically extracted from CapSoftware#1615 (keyboard-only, no captions changes) with bug fixes applied during extraction. Captures keystrokes during recording via device_query polling, groups them into segments, renders as WGPU overlays with fade/bounce animations, and provides interactive timeline editing.
- Modifier-only presses no longer create standalone segments - Rapid consecutive hotkeys (Cmd+C, Cmd+V, Cmd+Z) merge into a single segment instead of creating overlapping tiny ones - All segments enforce 300ms minimum visible duration - Added tests for rapid hotkey merging and minimum duration
…tion - Fix seconds/ms mismatch: displayDuration was passed as seconds to Rust expecting ms, causing segments to always have minimal length - Fix split logic: timeOffset (ms) was compared against split time (seconds) - Add font family dropdown (Monospace default, Sans-Serif, Serif) - Auto-regenerate segments when grouping settings change - Use + separator for hotkey combos (⌘+⇧+L instead of ⌘⇧L) - Uppercase keys in Shift combos (⌘+⇧+L not ⌘+⇧+l) - Rename linger -> display throughout codebase for clarity - Add unit suffixes to field names (fadeDurationSecs, displayDurationSecs, timeOffsetMs, groupingThresholdMs) to prevent future mismatches - Fix missing Input import in ConfigSidebar causing crash on segment click - Default font changed to System Monospace
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
Keyboard keystroke recording and display for the video editor. Extracted from #1615 (keyboard-only — no captions timeline changes).
What it does:
Changes from #1615
Extracted keyboard-only code and applied fixes during extraction:
Correctness
RMeta(right Command) not recognized as modifier" "vs"Space") — special-key logic now worksshow_special_keysis disabledcurrent_keysin modifier group transitionsgroup_key_events+separator (⌘+⇧+L instead of ⌘⇧L)Data integrity
None)displayTextandkeysat split pointskip_serializing_ifto reduce JSON sizecrypto.randomUUID()instead ofDate.now()Code quality
collapsible_if,unnecessary_lazy_evaluations,needless_borrow,unnecessary_cast)FromStrforKeyboardPositionreturnsErrfor unknowns +#[derive(Default)]set_scissor_rectGPU calleprintln!→tracing::warn!fadeDurationSecs,displayDurationSecs,timeOffsetMs,groupingThresholdMsFrontend (SolidJS)
getSettingtype safety (removedRecord<string, unknown>cast)selectedSegmentwrapped increateMemo(proper reactivity)MIN_KEYBOARD_SEGMENT_SECSconstantInputimport in ConfigSidebar (crash when clicking segment)Scope
Architecture
Follow-up
Mechanical keyboard sounds + click sounds will be a separate PR, using these keystroke timestamps and existing
CursorClickEventdata mixed into the audio pipeline.Test plan
cargo test -p cap-project— 17 tests passcargo check -p cap-desktop— full build passescargo clippy— cleanpnpm typecheck— only pre-existing web app errors