W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

ACTION-25: Make a proposal for the additions that the mobile folks have been asking for in keyboard events

From: Robin Berjon <robin.berjon@expway.fr>
Date: Fri, 14 Apr 2006 18:17:24 +0200
Message-Id: <EE3E9D2A-1D47-4C27-933B-88F623C7611E@expway.fr>
To: Public Web API <public-webapi@w3.org>


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

     The joystick's up orientation.
     The joystick's down orientation.
     The joystick's left orientation.
     The joystick's right orientation.
     The joystick's OK.
     The left application key on a mobile device.
     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  

     The 0 key.
     The 1 key.
     The 2 key.
     The 3 key.
     The 4 key.
     The 5 key.
     The 6 key.
     The 7 key.
     The 8 key.
     The 9 key.
     The * key.
     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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC