Re: DOM3EV: Specifying inappropriate modifiers to MouseEvent.initMouseEventNS

2006-04-20 Thread Robin Berjon


On Apr 20, 2006, at 02:20, Cameron McCormack wrote:
leaning towards B just because it's more easily implemented, and I  
can't
think of a valid reason for caring about whether Tab was  
specified as
a modifier or not, especially if there is no way to get the list of  
all

modifiers in effect.  I could imagine tiny implementations that would
want to avoid storing strings for modifier keys, and would favour just
storing (1) as a bitfield, but DOM 3 keyboard events are already  
pretty

string heavy.


I think B is the only option here, no one is ever going to write an  
application that actually has the knowledge to differentiate between  
the 1 and 2. And if someone did it, I'm sure the following week some  
weirdo would come up with a keyboard on which Tab can be used as a  
modifier too.


I don't think that storing as a bit-field is all that important in  
Tiny, it wouldn't optimise much. Besides, the Tiny subset of keyboard  
events don't have getModifierState() ATM.


--
Robin Berjon
   Senior Research Scientist
   Expway, http://expway.com/





DOM3EV: Specifying inappropriate modifiers to MouseEvent.initMouseEventNS

2006-04-19 Thread Cameron McCormack

What should happen if a key that is not a modifier is given in the
modifiersList argument of the MouseEvent.initMouseEventNS method?  There
would be three such not modifiers:

  1. keys that the implementation knows about and knows are not
 modifiers, such as Tab on a PC keyboard,

  2. those that the implementation knows about but also knows that the
 device doesn't support, such as Shift on a mobile phone, and

  3. those that the implementation does not know about, such as a
 Hyper key on a Sun keyboard, where the implementation has not
 been written with such a key in mind.

My initial reaction would be to do either:

  A. ignore (1) and store (2) and (3), or

  B. store (1), (2) and (3),

leaning towards B just because it's more easily implemented, and I can't
think of a valid reason for caring about whether Tab was specified as
a modifier or not, especially if there is no way to get the list of all
modifiers in effect.  I could imagine tiny implementations that would
want to avoid storing strings for modifier keys, and would favour just
storing (1) as a bitfield, but DOM 3 keyboard events are already pretty
string heavy.

-- 
 Cameron McCormack  ICQ: 26955922
 cam (at) mcc.id.au MSN: cam (at) mcc.id.au
 http://mcc.id.au/  JBR: heycam (at) jabber.org