feat: implement keyboard press tracking overlay #248#304
Open
itshakemd wants to merge 1 commit into
Open
Conversation
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.
✨ Feature: Keyboard Press Tracking Overlay
🔗 Closes #248
Summary
This PR implements a toggleable keyboard press tracking overlay that displays key combinations on screen during recording, similar to Screen Studio’s keystroke visualization.
The overlay appears in the bottom-right corner and is only active during recording sessions.
🧩 Features
Toggle Control
Added "Show keyboard press" option under Fast MP4 settings
Persisted using chrome.storage.local
Only visible when Fast MP4 recorder is active
Visual Overlay
Displays pressed keys as on-screen badges (bottom-right corner)
Supports modifier combinations (Ctrl / Alt / Shift / Cmd)
Auto-fades keys after 1 second
Limits display to 3 keys at once
Smooth fade-in/out animations
Behavior
Active only when:
Recording is in progress
Feature is enabled in settings
Modifier keys handled properly (keydown/keyup sync)
Uses capture-phase listeners for consistent key detection
⚙️ Technical Implementation
State Management
Added showKeyboardPress to ContentState
Synced via updateFromStorage
Overlay Component
KeyboardPressOverlay.jsx
Handles keyboard event listeners
Maps special keys to readable labels
Uses refs for lightweight state tracking
Auto cleanup via timeouts
Avoids unnecessary re-renders
Integration
Added to Wrapper.jsx alongside existing overlays
Renders only during active recording (returns null otherwise)
📁 Files Changed
ContentState.jsx – added state
updateFromStorage.js – storage sync
SettingsMenu.jsx – checkbox integration
Wrapper.jsx – overlay integration
messages.json – translation key
🆕 New Files
KeyboardPressOverlay.jsx