- From: Martin Thomson <notifications@github.com>
- Date: Wed, 06 Dec 2023 13:40:17 -0800
- To: whatwg/fullscreen <fullscreen@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/fullscreen/pull/232/review/1768657207@github.com>
@martinthomson commented on this pull request. Pretty good. Some suggestions. > @@ -640,6 +688,40 @@ iframe:fullscreen { +<h2 id="keyboard-locking">keyboard locking</h2> + +<p>keyboard Locking enhances the functionality of web applications running in fullscreen by allowing ```suggestion <p>Keyboard locking enhances the functionality of web applications running in fullscreen by allowing ``` > @@ -640,6 +688,40 @@ iframe:fullscreen { +<h2 id="keyboard-locking">keyboard locking</h2> ```suggestion <h2 id="keyboard-locking">Keyboard Locking</h2> ``` > + <dd><p>Captures all keys that the user agent would ordinarily receive, except those reserved for + critical system functions or security shortcuts (e.g., Ctrl+Alt+Del). ```suggestion <dd><p>Captures all keys that the user agent would ordinarily receive, such as those that open or close windows. This excludes those reserved for system-level interactions, such as key presses that open system menus or switch applications. ``` > + +<p>A <dfn>keyboard lock</dfn> enables web applications to capture and handle key inputs directly, +bypassing the default behavior typically executed by the user agent (in the case of +"{{FullscreenKeyboardLock/application}}") or operating system (in the case of +"{{FullscreenKeyboardLock/system}}"). When the [=keyboard lock flag=] is set for a [=document=], key +events that would normally trigger user agent or system-level actions are instead redirected to the +web application in fullscreen. + +<dl> + <dt><dfn>Application-level keyboard lock</dfn></dt> + <dd><p>Captures all keys that the user agent would ordinarily receive, except those reserved for + critical system functions or security shortcuts (e.g., Ctrl+Alt+Del). + <dt><dfn>System-level keyboard lock</dfn></dt> + <dd><p>Capture a wider range of keys, including those used for system-level navigation and + shortcuts (e.g., Alt+Tab), subject to user consent and user agent implementation. +</dl> ```suggestion </dl> <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. ``` > +<dl> + <dt><dfn>Application-level keyboard lock</dfn></dt> + <dd><p>Captures all keys that the user agent would ordinarily receive, except those reserved for + critical system functions or security shortcuts (e.g., Ctrl+Alt+Del). + <dt><dfn>System-level keyboard lock</dfn></dt> + <dd><p>Capture a wider range of keys, including those used for system-level navigation and + shortcuts (e.g., Alt+Tab), subject to user consent and user agent implementation. +</dl> + +<div algorithm> + <p>To <dfn>run the release the keyboard lock steps</dfn> for a <a>document</a> + <var>document</var>, run these steps: + <ol> + <li><p>If the [=keyboard lock flag=] for the <var>document</var> is not set, abort these steps. + <li><p>Deactivate the keyboard lock and restore the handling of keyboard inputs to the default + behavior of the user agent and the operating system. <li><p>Set the [=keyboard lock flag=] for ```suggestion behavior of the user agent and the operating system. <li><p>Set the [=keyboard lock flag=] for ``` > @@ -583,6 +626,11 @@ corresponding <a>event handler content attributes</a> for {{Element}} objects in <p>The user agent may end any fullscreen session without instruction from the end user or call to {{Document/exitFullscreen()}} whenever the user agent deems it necessary. +<p>Users should be clearly notified when [=keyboard locking=] is active, possibly through browser +UI indicators. + +<p>There should be a simple and intuitive method for users to override keyboard locking, reverting It would be really nice if we could standardize this. That way, the experience is consistent across browsers. I don't regard this as essential, but it would be nice. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/fullscreen/pull/232#pullrequestreview-1768657207 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/fullscreen/pull/232/review/1768657207@github.com>
Received on Wednesday, 6 December 2023 21:40:23 UTC