- From: Robin Berjon <robin.berjon@expway.fr>
- Date: Fri, 14 Apr 2006 18:17:24 +0200
- To: Public Web API <public-webapi@w3.org>
Hullo, a while back I took an action item (or rather, it was dumped on my head) to make a proposal to add the sort of keys that are common on mobile devices to D3EV. Here is a stab at it. So much of it is arbitrary that it's a touch difficult to know if something is right or wrong, but I'll trust y'all to tear it to pieces as one should. The requirement is simple: there need to be seven more keys, one for each of the "left" and "right" buttons that are common on mobile devices, and five for the five-way joystick. We could get more creative, suggestions will be entertained. In addition to that we need to add the ability to identify the longpress "modifier". The terms "joystick" and "mobile" are poor choices, but in digging around various amounts of documentation from various vendors, I only found similarly poor choices. I don't think that names matter much here, especially given the rest of the list, and I would like to avoid a too much of a bike-shed discussion, yet suggestions are as always welcome. : New Key Identifiers JoystickUp The joystick's up orientation. JoystickDown The joystick's down orientation. JoystickLeft The joystick's left orientation. JoystickRight The joystick's right orientation. JoystickOk The joystick's OK. MobileLeft The left application key on a mobile device. MobileRight The right application key on a mobile device. These could be added to the list in A.2 as is. : Reporting longpress A new key modifier is introduced, called LongPress. It should be added to the list given in getModifierState(), and it can naturally be used in the modifiersList argument of initKeyboardEvent*(). Since that doesn't necessarily make it sufficiently explicit to authors, an informative paragraph should be added to appendix A (see below). : Nicer key identifiers It has been suggested that since mobile keyboards have a pretty much universal set of 12 keys in common, it would be nice for authors if those were given identifiers friendlier than "U+0030" through "U +0039" (0-9), "U+0023" (#) and "U+002A" (*). I don't have a strong opinion, though I do agree that it would simplify matters. The following list could therefore be added (maybe calling them Dial* would be more informative than Key* given this is about keys in the first place, but using variants on a "key" prefix seems common in the industry): Key0 The 0 key. Key1 The 1 key. Key2 The 2 key. Key3 The 3 key. Key4 The 4 key. Key5 The 5 key. Key6 The 6 key. Key7 The 7 key. Key8 The 8 key. Key9 The 9 key. KeyStar The * key. KeyPound The # key. This could also be added to A.2 as is. : New section in appendix A (I would guess A.1.X) """ *Handling key events on mobile devices* Note: this section is non-normative. Keyboard input on mobile devices is not different from that which is found on other devices, but the keyboard layout there is often quite different from those which are typically found on personal computers. While one should not assume that all mobile devices will support the same set of keys, some are reasonably common: the MobileLeft and MobileRight application keys frequently located at the bottom of the screen, the four directions of the joystick, as well as the twelve dial keys ranging from Key0 to Key9, KeyStar, and KeyPound. It is often the case that a user can hold a key down for a longer period of time in order to modify the behaviour of a given key. This modifier is called "LongPress" and can therefore be queried using getModifierState("LongPress"). Note that depending on the device this information may be available when the keyup event is dispatched but not when the keydown event is. """ This is also related to ISSUE-51. Comments, etc. welcome. -- Robin Berjon Senior Research Scientist Expway, http://expway.com/
Received on Friday, 14 April 2006 16:17:13 UTC