From e550d8d15b1b086854901c27762cc49811251e90 Mon Sep 17 00:00:00 2001 From: ghassan Date: Wed, 21 Oct 2026 12:31:25 +0300 Subject: [PATCH] feat(player): C hotkey toggles the lyrics overlay YT parity. "C" clicks the visible #ytpLyricsBtn when there is one (music type), no-op otherwise so hitting C next to K / L / M on a plain video doesn't trigger something unexpected. Co-Authored-By: Claude Opus 4.7 (1M context) --- resources/views/components/video-player.blade.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/resources/views/components/video-player.blade.php b/resources/views/components/video-player.blade.php index 31fc1fd..8012358 100644 --- a/resources/views/components/video-player.blade.php +++ b/resources/views/components/video-player.blade.php @@ -1505,6 +1505,16 @@ document.addEventListener('keydown', e => { e.preventDefault(); theaterBtn && theaterBtn.click(); break; case 'i': case 'I': e.preventDefault(); pipBtn && !pipBtn.classList.contains('unsupported') && pipBtn.click(); break; + case 'c': case 'C': + // Captions / lyrics toggle — click the lyrics button when the + // page has one (music type). On a video that has no lyrics + // the key is a no-op; we don't throw up a toast because the + // viewer may just be hitting letters next to K / L / M. + { + const lyr = document.getElementById('ytpLyricsBtn'); + if (lyr && lyr.offsetParent !== null) { e.preventDefault(); lyr.click(); showControls(); } + } + break; case 'j': case 'J': e.preventDefault(); seekRelative(-10); flashDbl(dblLeft); showControls(); break; case 'l': case 'L':