ISSUE-161: Clarify KeyboardEvent.key


Clarify KeyboardEvent.key

HISTORICAL: DOM3 Events [All Bugs and Issues use Bugzilla:]
Raised by:
Doug Schepers
Opened on:
David Flanagan <>:
6) In the description of KeyboardEvent.key, it says "If the value is a
character, it must match the value of the KeyboardEvent.char attribute."
First, is "character" formally defined somewhere, or you mean
something like "If the key has a printable representation". Second:
what about the case of keyboard macros? If I've somehow bound Ctrl-J to
insert the string "JavaScript", then I would expect a Ctrl-J
KeyboardEvent to have "JavaScript" as its char value and "J" as its key
value. If this is the correct behavior then the phrase "must match" in
the spec is a problem. If keyboard macros are supposed to get expanded
into the key property, then that allows us to fake out keys that we
don't have on our keyboards by defining keyboard macros. In that case,
if I define a macro to insert the string "Camera", then that macro might
cause a webapp to behave as if the Camera key had been pressed. (It
almost seems like there is a security issue there...)

Related Actions Items:
No related actions
Related emails:
  1. RE: Re: ISSUE-161 ISSUE-160 ISSUE-159 ISSUE-158 ISSUE-156 (from on 2011-07-29)
  2. Re: ISSUE-161 ISSUE-160 ISSUE-159 ISSUE-158 (from on 2011-07-29)
  3. ISSUE-161 (KeyboardEvent.key): Clarify KeyboardEvent.key [DOM3 Events] (from on 2010-10-20)

Related notes:

Revision 1.179 updated using suggested text

Jacob Rossi, 6 May 2011, 02:12:23

Display change log ATOM feed

Chair, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <>.
$Id: 161.html,v 1.1 2016/01/25 10:26:17 carine Exp $