Skip to content

feat: implement keyboard press tracking overlay #248#304

Open
itshakemd wants to merge 1 commit into
alyssaxuu:masterfrom
itshakemd:master
Open

feat: implement keyboard press tracking overlay #248#304
itshakemd wants to merge 1 commit into
alyssaxuu:masterfrom
itshakemd:master

Conversation

@itshakemd
Copy link
Copy Markdown

✨ 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

capture + show keyboard shortcuts on screen

1 participant