Hi, Robin-
Thanks for starting this. A few thoughts:
* What about softkeys? I seem to recall that this was an issue that was
asked to be addressed. These might be an enumerated array.
* I don't have a better name than "joystick", unfortunately... but maybe it
should be lowercase (since they will be case-sensitive, and this seems like
a likely way to cause authoring errors). "key" might be better as "keypad"
to distinguish it from oldskool keys; it might also apply to those extra
numberpads that some keyboards have and which you can buy as USB peripherals
for laptops.
* We should handle diagonal directions. Some phones may have these, and
actual joysticks (as peripherals or on consoles or kiosks) certainly do. We
could do this a number of ways (in no order of preference):
+ add "joystickUpLeft", "joystickUpRight", "joystickDownLeft",
"joystickDownRight"
+ rely on two events (e.g. "joystickUp" and "joystickRight") being thrown
and somehow merged
+ add a single "joystick" event with a set of boolean properties for the 4
cardinal directions, so an author could check to see which were toggled
(i.e. "joystick.up==true; joystick.left==false; joystick.right==true;
joystick.down==false"); this doesn't allow for separate event handlers
+ add a single "joystick" event with an angle property (i.e.
"joystick.angle==42"), where the angle is in radians originating at the
top-middle of a circle, to allow the finest-grain control; this has the
advantage that it is the most precise and extensible, but doesn't allow for
separate event handlers; perhaps it could be used in conjunction with one of
the other options, like "joystickUp.angle==5".
* Intensity of directionality: some joysticks have faster movement the
further the stick is pushed from center. It is sometimes gradual, and
sometimes there is a quantum threshold. I propose that we have a single
property that captures this, somewhat like "wheelDelta". Perhaps "magnitude"
or "intensity" (my girlfriend suggests "increasification" because it sounds
Presidential), with a value from 0 to 1 ("0" would be the minimum, not
null).
* Not sure this is in scope, but some devices have multiple orientations, so
up might not always be up, it might be right, which would not be right.
Should this just be left up to the UA/device? How would this affect authors?
Should it be mentioned?
Regards-
Doug
Robin Berjon wrote:
|
| 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/
|
|
| --
| No virus found in this incoming message.
| Checked by AVG Free Edition.
| Version: 7.1.385 / Virus Database: 268.4.1/311 - Release
| Date: 4/13/2006
|
|