- From: Kagami Sascha Rosylight <notifications@github.com>
- Date: Thu, 07 May 2026 02:45:51 -0700
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fullscreen/pull/232/review/4242853059@github.com>
@saschanaz commented on this pull request.
> +like ESC or function keys are integral to the application's functionality.
+
+<p>A <a>keyboard lock</a> enables web applications to capture and handle key inputs directly,
+bypassing the default behavior typically executed by the user agent or operating system. Key events
+that would normally trigger user agent or system-level actions are instead redirected to the web
+application in fullscreen. Such key events (for individual keys or keyboard shortcuts) may either
+have no action while <a>keyboard lock</a> is active, or it could still have the same action but
+allow the web page to call {{Event/preventDefault()}} to cancel the action.
+
+<p>Whenever a <a>document</a>'s <a>keyboard lock</a> is changed from active to inactive, user agents
+must deactivate the keyboard lock and restore the handling of keyboard inputs to the default
+behavior of the user agent and the operating system.
+
+<p>User agents should reserve an additional input for the purposes of exiting fullscreen. There are
+also some system-level key sequences or combinations that cannot be intercepted for security
+reasons, such as Ctrl+Alt+Del on Windows.
Do we want to add implementation note somewhere around here? Something like:
For example, browsers that use Esc key for exiting fullscreen use keyboard lock to prevent immediate exit on key press, and instead require longer press to exit fullscreen. Some of such implementations also implicitly grant partial keyboard lock to fullscreen session, in that case Esc key may be the only key that is affected. See also https://github.com/whatwg/fullscreen/issues/260.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fullscreen/pull/232#pullrequestreview-4242853059
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fullscreen/pull/232/review/4242853059@github.com>
Received on Thursday, 7 May 2026 09:45:59 UTC