[w3c/pointerlock] Should not release pointer lock when pressing esc while fullscreen keyboard lock is active (Issue #110)

zcorpan created an issue (w3c/pointerlock#110)

https://w3c.github.io/pointerlock/#security says

> Esc key should [exit pointer lock](https://w3c.github.io/pointerlock/#dfn-exit-pointer-lock) with the user agent's [pointer-lock target](https://w3c.github.io/pointerlock/#dfn-pointer-lock-target).

https://github.com/whatwg/fullscreen/pull/232 introduces a keyboard lock option for `requestFullscreen()`. Chromium supports a separate API for keyboard lock.

I think it makes sense to not release the pointer lock when pressing esc if keyboard lock is active. Otherwise, the user experience for games is not ideal (e.g. if pressing esc opens and closes the in-game menu).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/pointerlock/issues/110
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/pointerlock/issues/110@github.com>

Received on Friday, 24 April 2026 09:19:56 UTC