diff --git a/js/app.js b/js/app.js index aed6e39..00bb14d 100644 --- a/js/app.js +++ b/js/app.js @@ -7708,7 +7708,20 @@ async function init() { const original = btn.textContent; btn.textContent = 'Press combo… (Esc to cancel)'; + // A combo already owned by another app via RegisterHotKey is + // swallowed by Windows — it is delivered to that app, never to us, + // so the capture would wait forever with no explanation. It also + // preventDefaults every keystroke while armed, so an abandoned + // capture freezes the app's keyboard. Time out and say why. + const timer = setTimeout(() => { + finish(true); + toast('No combo captured. If you did press one, another app ' + + 'already owns it — Windows routes it there and we never ' + + 'see it. Try a different combo.', 'warning'); + }, 10000); + function finish(restore) { + clearTimeout(timer); btn.dataset.capturing = ''; btn.classList.remove('is-capturing'); document.removeEventListener('keydown', onKey, true);