Skip to content

KcdMp.blur

Gives the keyboard and the mouse cursor back to the game.

The frame gives up what it holds: the game’s keys and mouse work again. The page’s script calls it itself when the player presses Esc, unless the page’s own key handler kept the key with preventDefault().

await KcdMp.blur()

Promise<void> - settles when the game has answered

document.querySelector("#close").addEventListener("click", () => KcdMp.blur());

KcdMp.focus · the Focus and visibility group of the index