- commit
- 414a06d4bce777c54e8fbb33c670846523ac7fc2
- parent
- 82b3f084dd10718430190a7d6d642ce6882853ef
- author
- dami etoile <dami.etoile@gmail.com>
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
Binary file.
@@ -424,7 +424,7 @@
424424 <div class="overlay-screen hidden" id="intro">425425 <div class="overlay-content">426426 <h1>keyhome</h1>427- <p id="intro-desc">Plug in your Titan key and choose an action.</p>427+ <p id="intro-desc">Type PIN, then c=connect · r=register · h=host</p>428428 429429 <!-- Unregistered: register or connect -->430430 <div id="intro-unregistered">@@ -611,7 +611,16 @@
611611 txt.textContent = text;612612 }613613 614- function showIntro() { document.getElementById('intro').classList.remove('hidden'); }614+ function showIntro() {615+ document.getElementById('intro').classList.remove('hidden');616+ // Focus the visible PIN input617+ setTimeout(() => {618+ const unregPin = document.getElementById('intro-pin-unreg');619+ const regPin = document.getElementById('intro-pin-reg');620+ const visible = unregPin.parentElement.parentElement.style.display !== 'none' ? unregPin : regPin;621+ if (visible) visible.focus();622+ }, 50);623+ }615624 function hideIntro() { document.getElementById('intro').classList.add('hidden'); }616625 function showTap() { document.getElementById('tap-overlay').classList.remove('hidden'); }617626 function hideTap() { document.getElementById('tap-overlay').classList.add('hidden'); }@@ -1547,6 +1556,32 @@
15471556 }15481557 });15491558 1559+ // ─── PIN keyboard shortcuts ─────────────────────────────────────────1560+ // When PIN has content: c=connect, r=register, h=host1561+ document.addEventListener('keydown', (e) => {1562+ const intro = document.getElementById('intro');1563+ if (intro.classList.contains('hidden')) return;1564+1565+ // Only trigger on c/r/h when focused in a PIN field with content1566+ const active = document.activeElement;1567+ if (!active || !active.classList.contains('overlay-input')) return;1568+ const pin = active.value.trim();1569+ if (!pin) return;1570+1571+ const key = e.key.toLowerCase();1572+ if (key === 'c') {1573+ e.preventDefault();1574+ if (active.id === 'intro-pin-unreg') introConnectUnreg();1575+ else introConnectReg();1576+ } else if (key === 'r' && active.id === 'intro-pin-unreg') {1577+ e.preventDefault();1578+ introRegister();1579+ } else if (key === 'h' && active.id === 'intro-pin-reg') {1580+ e.preventDefault();1581+ introHost();1582+ }1583+ });1584+15501585 // ─── Init ───────────────────────────────────────────────────────────15511586 checkRegistration();15521587 scanFido();