W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2014

[Pointer Lock] Comments

From: timeless <timeless@gmail.com>
Date: Tue, 2 Dec 2014 21:43:00 -0500
Message-ID: <CACsW8eHmXjx6ZtPGybYLOqMOsjbwa6RwB_YH4ua6mS9eBbJecg@mail.gmail.com>
To: public-webapps@w3.org
1. w3c is en-us


modelling -> modeling

2. Xlib


> Direct APIs do not exist on all platforms (Win, Mac, Linux) to bound the
cursor to a specific rectangle, and prototypes have not yet been developed
to demonstrate building that behavior by e.g. invisible windows with xlib
or manual cursor movement on Mac.

"Xlib - Wikipedia, the free encyclopedia" --

Also note that "Mac" is not a proper term, it could be "Mac OS (X)",
"Macintosh ..." or "macs".

3. Mouse capture


> Pointer Lock is related to Mouse Capture [MDN-SETCAPTURE].

should https://www.w3.org/Bugs/Public/show_bug.cgi?id=14600 be noted?

MS should probably be referenced:
http://msdn.microsoft.com/en-us/library/ie/ms536742%28v=vs.85%29.aspx since
it's their fault...

4. a11y/i18n


> An event generated by the user agent as a result of user interaction
intended to interact with the page. e.g. click, but not mousemove.
> Engagement gestures are any events included in the definition of being
allowed to show a popup with the addition of keypress and keyup.

"shift", or "control+shift" and similar things are often used to trigger an
assistive technology, or an IME / language switch.


> turn StickyKeys on or off by by pressing the SHIFT key five times


> Switch between languages or keyboard layouts CTRL+SHIFT or left ALT+SHIFT


> When you press the APOSTROPHE (') key, QUOTATION MARK (") key, ACCENT
GRAVE (`) key, TILDE (~) key, ACCENT CIRCUMFLEX key, or CARET (^) key,
nothing appears on the screen until you press the a second key. If you
press one of the letters designated as eligible to receive an accent mark,
the accented version of the letter appears. If you press an ineligible key,
two separate characters appear. In other words, the US-International
keyboard layout dynamic-link library (DLL) automatically accents letters
that customarily receive an accent but does not automatically accent
letters that do not customarily receive an accent.

While it's nice to allow for "keys" to trigger a lock, "keys" that may
eventually be handled by something outside the UA should probably not be
eligible for this.

5. must


> Two events are used to communicate pointer lock state change or an error
in changing state. They are named pointerlockchange and pointerlockerror.
If pointer lock is entered or exited for any reason a pointerlockchange
event must be sent.

If I press ctrl-w/cmd-w (close window/tab), is the UA required to send
these events?

If an iframe has pointerlock, and its parent removes the iframe from the
dom, is the UA required to send these events?
If an iframe has pointerlock, and its parent changes the iframe's document
url to another page, is the UA required to send these events?

6. and


> (for example: mousemove, mousedown, mouseup, click, wheel)
> (for example: mouseover, mouseout, drag, drop).

Please use "and" -- you do elsewhere:

> clientX, clientY, screenX, and screenY

7. movement/focus


> Movement and button presses of the mouse must not cause the window to
lose focus.

Suppose I'm using Windows w/ a standard 104 key keyboard:

If I press a system key (the Windows key), or a system key equivalent
stroke (ctrl+esc), I expect the application to lose focus.


If I press the home key on an Android device, I expect the window to lose

If a user is on a system where there is no hardware home button, but there
is a gesture which enables interacting with the system, the UA shouldn't be
out of compliance.

see Fast Quick Settings Access --

8. comma comma


> onpointerlockchange of type EventHandler, , nullable

the extra comma here is not helpful.

> onpointerlockerror of type EventHandler, , nullable

the extra comma here is not helpful.

> pointerLockElement of type Element, readonly , nullable

the extra space before the comma here is not helpful.

9. if pointer lock state is currently unlocked?


> Initiates an exit from pointer lock state if currently locked to a target
in this document, and sends a pointerlockchange event when the lock state
has been exited.

10. please spell out screenY


> (the same location that is reported in screenX/Y when the pointer is

11. Long bounds


> All motion data must be delivered via mousemove events such that
> between any two mouse events earlierEvent and currentEvent the value of
> is equivalent to the sum of all movementX values received on mousemove
events after earlierEvent.

webidl: The long type is a signed integer type that has values in the range
[−2147483648, 2147483647].

Suppose I have a computer with a lot of time on its hand.

T1. trigger a page with pointerlock triggering code
T2. pointerlock triggers
T3. computer moves the mouse 100 pixels (x direction only, the computer is
very precise)
T4. computer goes to step T3 (this may take ~21,474,800 steps depending on
screen position... -- but as I said, the computer has time on its hands)

Eventually, I believe that one of screenX or movementX will hit an end of
the `long` range. Will the "equivalent" statement above still apply?

12. valid?


> movementX/Y must be valid regardless of pointer lock state.

what does "valid" mean?

13. a


> A default unlock gesture must always be available that will exit pointer

I'm not sure what a default unlock gesture looks like, but please see 7 for
at least some examples where I suspect platforms will have multiple
gestures where the application will lose focus. I'd like to ensure that the
text understands this and makes it clear to implementers and consumers.

14. exit due to events


> Pointer lock must not be exited when fullscreen [FULLSCREEN] is entered
or exited unless the pointer
> is required to enable interaction with the user agent graphical user
> or the default unlock gesture was used to exit both fullscreen and
pointer lock.

I'm using a laptop, it's running Windows 8. It isn't connected to a
charging source (and hasn't been for 7 hours). I use a UA w/
PointerLock+FullScreen w/ a web page that takes pointer lock and full
screen. My system needs to tell me that I'm going to run out of power. It
does so.

I'm using a corporate laptop. It has a screen saver with a short timeout
(IT...). I trigger the same app w/ the same full screen+pointer lock and
then get coffee. When I get back, my system has taken focus and sent it to
the screen saver.

I'm using a phone. It has a phone. I trigger the same app w/ the same full
screen+pointer lock and I receive a phone call. I need to be able to answer
the phone call.

I believe that the language I've quoted violates all three of the UCs I've

15. give your examples ids



16. missing ;


>  var ee = document.createEvent("MouseEvents");

>  var target = document.elementFromPoint(x, y)

>  if (e._isSynthetic)
>    return;

>  if (target)
>    target.dispatchEvent(ee)

17. undocumented


> Changing to new tabs, windows, or any other action that causes a page to
lose focus will exit pointer lock.

I can't find this in the spec

18. Sentences start with capital letters


> Mouse Capture [MDN-SETCAPTURE] handles low security risk mouse event
target lock for the duration of a mouse drag gesture.
> pointer lock removes the concept of the cursor and directs all events to
a given target.

^ this is the beginning of a sentence...

> They are related, but different.

19. Brands


> Direct APIs do not exist on all platforms (Win, Mac, Linux)

Please spell out Windows and Mac OS X.

> to bound the cursor to a specific rectangle, and prototypes have not yet
been developed to demonstrate building that behavior by e.g.
> invisible windows with xlib

See earlier comment about Xlib

> or manual cursor movement on Mac. Unaccelerated Delta values have been
proposed to be accessed by reading raw Human Interface Device (HID) data.
> E.g. WM_INPUT messages on windows, and USB device APIs on Mac / Linux.

Note that this Windows should be Windows, not to be confused with the
earlier windows which was not!
And again, Mac OS X (or Macintosh, if you want to be inaccurate).

20. reference for "invisible windows"


> e.g. invisible windows with xlib

Please reference:
or something.

21. references


> "Why bundle all functionality (hiding cursor, providing mouse deltas)
instead of using CSS to hide the cursor, always providing delta values, and
offering an API to restrict the cursor movement to a portion of the web
page?" above.

Please save those of us with screen readers the pain of trying to find
above. You appear to have anchors for this target, please use them.

22. Accessibility

> users are expected to have already configured the full system of hardware
input and operating system
> options resulting in a comfortable control the system mouse cursor.

If I'm using a Screen Reader. What should happen?

The screen reader I normally use rarely sends mouse move events. It tends
to only send mouse click events. It also spends a lot of time focusing
things. Because the user wants to know what they are. (As far as the user
is concerned, if the item can't be partially focused, it doesn't exist.)

Note: The screen reader's click on something will almost certainly be a
valid "Engagement gesture" unless modifications are made to the
Received on Wednesday, 3 December 2014 02:43:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:32 UTC