W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2009

Re: Proposal: addKeyListener and removeKeyListener Methods

From: Maciej Stachowiak <mjs@apple.com>
Date: Sun, 13 Sep 2009 15:10:37 -0700
Cc: Doug Schepers <schepers@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
Message-id: <573B34CD-F727-495E-9CDA-5A3F62D52720@apple.com>
To: Travis Leithead <travil@microsoft.com>

On Sep 13, 2009, at 2:56 PM, Travis Leithead wrote:

> I tend to agree with Maciej regarding getting the spec into shipping  
> mode.
>
> However the use cases are good. An additional use case worth  
> considering is being able to filter based on character inserted into  
> the DOM [or set of characters]--rather than the method used to cause  
> them to appear.  Something like that could provide for a less- 
> verbose DOMCharacterDataModified replacement.

That does sound like an interesting use case, but it also seems quite  
challenging to design and specify. I'm still inclined to table new  
features for now and get what we have wrapped up quickly. Once DOM3EV  
is in CR, we can start work on DOM4EV.

  - Maciej


>
> -Travis
>
>> -----Original Message-----
>> From: www-dom-request@w3.org [mailto:www-dom-request@w3.org] On
>> Behalf Of Maciej Stachowiak
>> Sent: Sunday, September 13, 2009 2:32 PM
>> To: Doug Schepers
>> Cc: www-dom@w3.org
>> Subject: Re: Proposal: addKeyListener and removeKeyListener Methods
>>
>>
>> This seems like a neat idea for DOM4 Events. For DOM3, shouldn't we  
>> be
>> holding off on new features at this point? This spec has been  
>> delayed many
>> years now, and I'd really like it if we could advance it to Last  
>> Call soon. Adding
>> new features works against that. Let's get into the shipping mindset.
>>
>> Cheers,
>> Maciej
>>
>> On Sep 12, 2009, at 1:36 PM, Doug Schepers wrote:
>>
>>> Hi, DOM3 Events fans-
>>>
>>> Since DOM3 Events now has a more robust (and standardized) keyboard
>>> event model, it seemed appropriate to consider more closely how it
>>> might be used.  As an input device, the keyboard is particularly
>>> complicated, with many keys having dedicated functionality.  To some
>>> degree, I addressed this in the description of default actions of  
>>> the
>>> 'keydown' event [1], but there have been many times where I wished  
>>> to
>>> listen only to specific keys.  It's easy enough to filter out the  
>>> keys
>>> using the "if...else" or "switch" statements in the event handler,  
>>> but
>>> it would be nice to attach different listeners to different keys to
>>> dispatch to different event handlers.
>>>
>>> Thus, I've tentatively added a proposal for new 'addKeyListener' and
>>> 'removeKeyListener' methods to the Event interface, which you can
>>> review and comment on in the latest draft. [2]
>>>
>>> I'm open to suggestions to improve this idea, and obviously it  
>>> depends
>>> on implementers' willingness to include it, but I would personally
>>> like some mechanism to do this.
>>>
>>> [1]
>>> http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-
>> Events.html
>>> #event-type-keydown [2]
>>> http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-
>> Events.html
>>> #interface-Event
>>>
>>> Regards-
>>> -Doug Schepers
>>> W3C Team Contact, SVG and WebApps WGs
>>>
>>
>>
>
Received on Sunday, 13 September 2009 22:11:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:03 GMT