You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we're attempting to specify interactionId in Event Timing: w3c/event-timing#102.
It would be helpful if we could have a way to easily talk about groups of events that are associated because they correspond to some user interaction. In particular, we are interested in the following user interactions:
Pressing (and potentially releasing) a key. This would cause at least keydown, keypress, and keyup. We care mostly about being able to group keydown and keyup as corresponding to the same physical key. I think this case is relatively simple: the code attribute values would be the same for such events. But obviously we don't want to group all keys with the same code in one group, but instead group the keydown either by itself or with the subsequent keyup, assuming there is no keydown with the same code in between the two.
Taps and drags: this seems a bit trickier. We want to group pointerdown, touchstart, pointerup, touchend, mousedown, mouseup, and click caused by either a tap/click or a drag on the website. I think this is tricky for a couple of reasons. First, we do not want to include scrolls, which can trigger some of these events, like pointerdown. Second, I'm not quite sure if there is some analogue to code that uniquely identifies the physical trigger for all of those events. I know that MouseEvents have a button and PointerEvents have a pointerId, but can they be compared? We can probably ignore the touch events, and at the very minimum we want to group at least pointerdown, pointerup, and click, and as they are all PointerEvents then we can group them by pointerId. This similarly requires some logic to group only events that correspond to the same tap/drag together instead of just all events with the same pointerId.
Anyways, let me know if this makes sense and whether this is something you think could belong in this specification! I guess the second one might not since PointerEvents are in a separate spec?
The text was updated successfully, but these errors were encountered:
Agreed, or better yet, define various user interactions and the chain of events that follow from those interactions in one place (section), separate from the event API definitions. Then the order of events would be well-defined from those definitions, and the requirements saying "event X must be before event Y but after event Z" can be removed.
FYI: keydown and keyup may not be fired as a pair if it's consumed by OS/IME or active application is changed (e.g., Alt + Tab on Windows). And also when active document is changed by the browser itself.
Currently we're attempting to specify interactionId in Event Timing: w3c/event-timing#102.
It would be helpful if we could have a way to easily talk about groups of events that are associated because they correspond to some user interaction. In particular, we are interested in the following user interactions:
keydown
,keypress
, andkeyup
. We care mostly about being able to groupkeydown
andkeyup
as corresponding to the same physical key. I think this case is relatively simple: thecode
attribute values would be the same for such events. But obviously we don't want to group all keys with the samecode
in one group, but instead group thekeydown
either by itself or with the subsequentkeyup
, assuming there is nokeydown
with the samecode
in between the two.pointerdown
,touchstart
,pointerup
,touchend
,mousedown
,mouseup
, andclick
caused by either a tap/click or a drag on the website. I think this is tricky for a couple of reasons. First, we do not want to include scrolls, which can trigger some of these events, likepointerdown
. Second, I'm not quite sure if there is some analogue tocode
that uniquely identifies the physical trigger for all of those events. I know that MouseEvents have abutton
and PointerEvents have apointerId
, but can they be compared? We can probably ignore the touch events, and at the very minimum we want to group at leastpointerdown
,pointerup
, andclick
, and as they are all PointerEvents then we can group them bypointerId
. This similarly requires some logic to group only events that correspond to the same tap/drag together instead of just all events with the samepointerId
.Anyways, let me know if this makes sense and whether this is something you think could belong in this specification! I guess the second one might not since PointerEvents are in a separate spec?
The text was updated successfully, but these errors were encountered: