Re: Actions questions

On 27/04/16 11:43, Andreas Tolfsen wrote:
> Tue, 26 Apr 2016 17:50:05 -0700 Jason Juang <juangj@google.com>:
>> On Wed, Apr 20, 2016 at 1:08 PM, David Burns <dburns@mozilla.com>
>> wrote:
>>> Is it expected that the keyboard model has key repetition e.g. if I
>>> do
>>>>
>>>> [[{keyDown a}, {pause 10}, {keyUp a}]]
>>>>
>>>> when the focus is on an input control, how many "a" characters
>>>> should I see?
>>>
>>> Originally I didnt think of this but I guess, from my previous
>>> answer above I think we should see a "few" a's
>>
>> If you split up the action chain and send
>>
>>    [[{keyDown a}]]
>>
>> then wait, say, 5 real-time seconds, and then send
>>
>>    [[{keyUp a}]]
>>
>> should you expect that the key repeats during the entire interval
>> between the actions? Or does the key only repeat if there is an
>> explicit pause command?
>
> James and I discussed this the other day and reached the conclusion it
> should not.
>
> Whilst it is possible to fake holding down a key by factoring in the
> frame rate and the OS key repeat rate to generate x DOM events over the
> course of y seconds, this quickly gets us into the realm of reproducing
> realistic time frames.
>

I have a number of other things to talk about on this thread, but just 
responding to this point:


Based on http://unixpapa.com/js/testkey.html it seems like holding down 
a key generates a number of keydown+keypress events, but a single keyup 
event. So it seems quite reasonable to model this with multiple actions 
as long the spec doesn't have anything special to coalesce multiple 
keyDown actions without an intervening keyUp action.

Received on Wednesday, 27 April 2016 10:51:37 UTC