W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2013

Keyboard events for accessible RIAs and Games

From: Florian Bösch <pyalot@gmail.com>
Date: Wed, 30 Jan 2013 15:11:40 +0100
Message-ID: <CAOK8ODgcJtSm5dLSytGvXt=Xyx2TLY1O_VdScO2T5uk6UqQoWw@mail.gmail.com>
To: www-dom@w3.org
Cc: Arthur Barstow <art.barstow@nokia.com>
I have written a blog post at length about this issue here:

In short the problem is the following:
- RIAs (shortcut systems) and Games (shortcut systems and action systems)
need to be able to identify each key uniquely regardless of modifier keys
- To make things mappable an unmodified primary symbol or description needs
to be available to display to the user.
- To make things speedy to handle there should also be an accompanying
unmodified keyCode (numeric)

The current event model (keyCode, charCode and which) do not satisfy that
- The same keyCode appears on multiple keys
- The same charCode appears (differently from keyCode) on multiple keys
- charCode and keyCode change based on modifiers
- keyCodes cannot be converted to a users locale
- no non printable key descriptions are offered
- "which" is a combination of all the problems above.

It is recognized that this is not a good way to do things as for instance
the MDN already lists "keyCode", "charCode" and "which" as deprecated.

The DOM Event Level 3 does not solve all these problems:
- The char member is still being delivered modified
- The key member has to match the char member for printable keys
- There is no numeric unmodified keyCode

I would suggest:
- Add a primary key symbol (printable, from the users locale) umodified and
for non printable keys add the human readable description ('backspace',
'enter' etc.)
- Add an additional unmodified key code member holding the numeric key code
Received on Wednesday, 30 January 2013 14:12:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:01 UTC