diff --git a/src/components/geek/Keyboard.astro b/src/components/geek/Keyboard.astro index 8d693b8..bada4da 100644 --- a/src/components/geek/Keyboard.astro +++ b/src/components/geek/Keyboard.astro @@ -67,15 +67,19 @@ const routes: Record = { (document.getElementById('kbd-help') as HTMLDialogElement | null)?.showModal(); return; } + // 路由判断必须先于 g 武装分支:g→g 自身也是合法 chord(gallery), + // 原序里第二击 g 永远重新武装、routes['g'] 不可达——Phase 1 潜伏缺陷 + // (g g 全站失灵实锤于 2026-10-25 矩阵测试) + if (chord === 'g' && routes[e.key]) { + location.href = routes[e.key]!; + chord = ''; + clearTimeout(chordTimer); + return; + } if (e.key === 'g') { chord = 'g'; clearTimeout(chordTimer); chordTimer = window.setTimeout(() => (chord = ''), 300); - return; - } - if (chord === 'g' && routes[e.key]) { - location.href = routes[e.key]!; - chord = ''; } });