--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WD-UI-Events-20140612.html Tue Jun 10 08:55:55 2014 -0700
@@ -0,0 +1,699 @@
+<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML+RDFa 1.1//EN' 'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd'>
+<html lang="en" dir="ltr" typeof="bibo:Document w3p:WD" about="" property="dcterms:language" content="en" prefix="bibo: http://purl.org/ontology/bibo/ w3p: http://www.w3.org/2001/02pd/rec54#" xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>UI Events</title>
+
+
+
+ <style type="text/css">/* --- ISSUES/NOTES --- */
+div.issue-title, div.note-title {
+ padding-right: 1em;
+ min-width: 7.5em;
+ color: #b9ab2d;
+}
+div.issue-title { color: #e05252; }
+div.note-title { color: #2b2; }
+div.issue-title span, div.note-title span {
+ text-transform: uppercase;
+}
+div.note, div.issue {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+.note > p:first-child, .issue > p:first-child { margin-top: 0 }
+.issue, .note {
+ padding: .5em;
+ border-left-width: .5em;
+ border-left-style: solid;
+}
+div.issue, div.note {
+ padding: 1em 1.2em 0.5em;
+ margin: 1em 0;
+ position: relative;
+ clear: both;
+}
+span.note, span.issue { padding: .1em .5em .15em; }
+
+.issue {
+ border-color: #e05252;
+ background: #fbe9e9;
+}
+.note {
+ border-color: #52e052;
+ background: #e9fbe9;
+}
+
+
+</style><style type="text/css">/* --- WEB IDL --- */
+pre.idl {
+ border-top: 1px solid #90b8de;
+ border-bottom: 1px solid #90b8de;
+ padding: 1em;
+ line-height: 120%;
+}
+
+pre.idl::before {
+ content: "WebIDL";
+ display: block;
+ width: 150px;
+ background: #90b8de;
+ color: #fff;
+ font-family: initial;
+ padding: 3px;
+ font-weight: bold;
+ margin: -1em 0 1em -1em;
+}
+
+.idlType {
+ color: #ff4500;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+/*.idlModule*/
+/*.idlModuleID*/
+/*.idlInterface*/
+.idlInterfaceID, .idlDictionaryID, .idlCallbackID, .idlEnumID {
+ font-weight: bold;
+ color: #005a9c;
+}
+a.idlEnumItem {
+ color: #000;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+.idlSuperclass {
+ font-style: italic;
+ color: #005a9c;
+}
+
+/*.idlAttribute*/
+.idlAttrType, .idlFieldType, .idlMemberType {
+ color: #005a9c;
+}
+.idlAttrName, .idlFieldName, .idlMemberName {
+ color: #ff4500;
+}
+.idlAttrName a, .idlFieldName a, .idlMemberName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlMethod*/
+.idlMethType, .idlCallbackType {
+ color: #005a9c;
+}
+.idlMethName {
+ color: #ff4500;
+}
+.idlMethName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlCtor*/
+.idlCtorName {
+ color: #ff4500;
+}
+.idlCtorName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlParam*/
+.idlParamType {
+ color: #005a9c;
+}
+.idlParamName, .idlDefaultValue {
+ font-style: italic;
+}
+
+.extAttr {
+ color: #666;
+}
+
+/*.idlSectionComment*/
+.idlSectionComment {
+ color: gray;
+}
+
+/*.idlConst*/
+.idlConstType {
+ color: #005a9c;
+}
+.idlConstName {
+ color: #ff4500;
+}
+.idlConstName a {
+ color: #ff4500;
+ border-bottom: 1px dotted #ff4500;
+ text-decoration: none;
+}
+
+/*.idlException*/
+.idlExceptionID {
+ font-weight: bold;
+ color: #c00;
+}
+
+.idlTypedefID, .idlTypedefType {
+ color: #005a9c;
+}
+
+.idlRaises, .idlRaises a.idlType, .idlRaises a.idlType code, .excName a, .excName a code {
+ color: #c00;
+ font-weight: normal;
+}
+
+.excName a {
+ font-family: monospace;
+}
+
+.idlRaises a.idlType, .excName a.idlType {
+ border-bottom: 1px dotted #c00;
+}
+
+.excGetSetTrue, .excGetSetFalse, .prmNullTrue, .prmNullFalse, .prmOptTrue, .prmOptFalse {
+ width: 45px;
+ text-align: center;
+}
+.excGetSetTrue, .prmNullTrue, .prmOptTrue { color: #0c0; }
+.excGetSetFalse, .prmNullFalse, .prmOptFalse { color: #c00; }
+
+.idlImplements a {
+ font-weight: bold;
+}
+
+dl.attributes, dl.methods, dl.constants, dl.constructors, dl.fields, dl.dictionary-members {
+ margin-left: 2em;
+}
+
+.attributes dt, .methods dt, .constants dt, .constructors dt, .fields dt, .dictionary-members dt {
+ font-weight: normal;
+}
+
+.attributes dt code, .methods dt code, .constants dt code, .constructors dt code, .fields dt code, .dictionary-members dt code {
+ font-weight: bold;
+ color: #000;
+ font-family: monospace;
+}
+
+.attributes dt code, .fields dt code, .dictionary-members dt code {
+ background: #ffffd2;
+}
+
+.attributes dt .idlAttrType code, .fields dt .idlFieldType code, .dictionary-members dt .idlMemberType code {
+ color: #005a9c;
+ background: transparent;
+ font-family: inherit;
+ font-weight: normal;
+ font-style: italic;
+}
+
+.methods dt code {
+ background: #d9e6f8;
+}
+
+.constants dt code {
+ background: #ddffd2;
+}
+
+.constructors dt code {
+ background: #cfc;
+}
+
+.attributes dd, .methods dd, .constants dd, .constructors dd, .fields dd, .dictionary-members dd {
+ margin-bottom: 1em;
+}
+
+table.parameters, table.exceptions {
+ border-spacing: 0;
+ border-collapse: collapse;
+ margin: 0.5em 0;
+ width: 100%;
+}
+table.parameters { border-bottom: 1px solid #90b8de; }
+table.exceptions { border-bottom: 1px solid #deb890; }
+
+.parameters th, .exceptions th {
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+ font-family: initial;
+ font-weight: normal;
+ text-shadow: #666 1px 1px 0;
+}
+.parameters th { background: #90b8de; }
+.exceptions th { background: #deb890; }
+
+.parameters td, .exceptions td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+ vertical-align: top;
+}
+
+.parameters tr:first-child td, .exceptions tr:first-child td {
+ border-top: none;
+}
+
+.parameters td.prmName, .exceptions td.excName, .exceptions td.excCodeName {
+ width: 100px;
+}
+
+.parameters td.prmType {
+ width: 120px;
+}
+
+table.exceptions table {
+ border-spacing: 0;
+ border-collapse: collapse;
+ width: 100%;
+}
+</style><link rel="stylesheet" type="text/css" href="table.css" media="screen" />
+<style type="text/css">/*****************************************************************
+ * ReSpec 3 CSS
+ * Robin Berjon - http://berjon.com/
+ *****************************************************************/
+
+/* --- INLINES --- */
+em.rfc2119 {
+ text-transform: lowercase;
+ font-variant: small-caps;
+ font-style: normal;
+ color: #900;
+}
+
+h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
+h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
+ border: none;
+}
+
+dfn {
+ font-weight: bold;
+}
+
+a.internalDFN {
+ color: inherit;
+ border-bottom: 1px solid #99c;
+ text-decoration: none;
+}
+
+a.externalDFN {
+ color: inherit;
+ border-bottom: 1px dotted #ccc;
+ text-decoration: none;
+}
+
+a.bibref {
+ text-decoration: none;
+}
+
+cite .bibref {
+ font-style: normal;
+}
+
+code {
+ color: #ff4500;
+}
+
+/* --- TOC --- */
+.toc a, .tof a {
+ text-decoration: none;
+}
+
+a .secno, a .figno {
+ color: #000;
+}
+
+ul.tof, ol.tof {
+ list-style: none outside none;
+}
+
+.caption {
+ margin-top: 0.5em;
+ font-style: italic;
+}
+
+/* --- TABLE --- */
+table.simple {
+ border-spacing: 0;
+ border-collapse: collapse;
+ border-bottom: 3px solid #005a9c;
+}
+
+.simple th {
+ background: #005a9c;
+ color: #fff;
+ padding: 3px 5px;
+ text-align: left;
+}
+
+.simple th[scope="row"] {
+ background: inherit;
+ color: inherit;
+ border-top: 1px solid #ddd;
+}
+
+.simple td {
+ padding: 3px 10px;
+ border-top: 1px solid #ddd;
+}
+
+.simple tr:nth-child(even) {
+ background: #f0f6ff;
+}
+
+/* --- DL --- */
+.section dd > p:first-child {
+ margin-top: 0;
+}
+
+.section dd > p:last-child {
+ margin-bottom: 0;
+}
+
+.section dd {
+ margin-bottom: 1em;
+}
+
+.section dl.attrs dd, .section dl.eldef dd {
+ margin-bottom: 0;
+}
+
+@media print {
+ .removeOnSave {
+ display: none;
+ }
+}
+</style><link rel="stylesheet" href="https://www.w3.org/StyleSheets/TR/W3C-WD" />
+<!--[if lt IE 9]><script src='https://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]-->
+</head>
+<body class="h-entry" id="respecDocument"><div class="head" id="respecHeader">
+ <p>
+
+ <a href="http://www.w3.org/"><img width="72" height="48" src="https://www.w3.org/Icons/w3c_home" alt="W3C" /></a>
+
+ </p>
+ <h1 class="title p-name" id="title" property="dcterms:title">UI Events</h1>
+
+ <h2 property="dcterms:issued" datatype="xsd:dateTime" content="2014-06-12T07:00:00.000Z" id="w3c-working-draft-12-june-2014"><abbr title="World Wide Web Consortium">W3C</abbr> Working Draft <span class="dt-published time">12 June 2014</span></h2>
+ <dl>
+
+ <dt>This version:</dt>
+ <dd><a class="u-url" href="http://www.w3.org/TR/2014/WD-uievents-20140612/">http://www.w3.org/TR/2014/WD-uievents-20140612/</a></dd>
+ <dt>Latest published version:</dt>
+ <dd><a href="http://www.w3.org/TR/uievents/">http://www.w3.org/TR/uievents/</a></dd>
+
+
+ <dt>Latest editor's draft:</dt>
+ <dd><a href="https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm">https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm</a></dd>
+
+
+
+
+
+
+ <dt>Previous version:</dt>
+ <dd><a rel="dcterms:replaces" href="http://www.w3.org/TR/2013/WD-uievents-20130725/">http://www.w3.org/TR/2013/WD-uievents-20130725/</a></dd>
+
+
+ <dt>Editors:</dt>
+ <dd class="p-author h-card vcard" rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a class="u-url url p-name fn" rel="foaf:homepage" property="foaf:name" content="Gary Kacmarcik" href="mailto:garykac@google.com?subject=%5BUIEvents%5D%20Spec%20Feedback">Gary Kacmarcik</a>, <a rel="foaf:workplaceHomepage" class="p-org org h-org h-card" href="http://www.google.com">Google, Inc.</a> (Dec 2012 - present)</span>
+</dd>
+<dd class="p-author h-card vcard" rel="bibo:editor" inlist=""><span typeof="foaf:Person"><a class="u-url url p-name fn" rel="foaf:homepage" property="foaf:name" content="Travis Leithead" href="mailto:travis.leithead@microsoft.com?subject=%5BUIEvents%5D%20Spec%20Feedback">Travis Leithead</a>, <a rel="foaf:workplaceHomepage" class="p-org org h-org h-card" href="http://www.microsoft.com">Microsoft Corp.</a> (Dec 2012 - present)</span>
+</dd>
+
+
+
+ </dl>
+
+
+
+
+
+ <p class="copyright">
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
+ 2014
+
+ <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
+ (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
+ <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
+ <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>),
+
+ All Rights Reserved.
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
+ <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
+
+ <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
+
+ rules apply.
+ </p>
+
+
+ <hr />
+</div>
+ <div id="abstract" class="introductory section" property="dcterms:abstract" datatype="" typeof="bibo:Chapter" resource="#abstract" rel="bibo:Chapter"><h2 id="h2_abstract">Abstract</h2>
+ <p>This specification extends the events and features defined in DOM Events
+ Level 3.</p>
+ </div><div id="sotd" class="introductory section" typeof="bibo:Chapter" resource="#sotd" rel="bibo:Chapter"><h2 id="h2_sotd">Status of This Document</h2>
+
+
+
+ <p>
+ <em>This section describes the status of this document at the time of its publication.
+ Other documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the
+ latest revision of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports index</a> at
+ http://www.w3.org/TR/.</em>
+ </p>
+
+ <p>Comments submitted in regard to this document should have their subject
+ line prefixed with the string <q>[uievents]</q> to help facilitate
+ tracking on the
+ <a href="http://lists.w3.org/Archives/Public/www-dom/">www-dom
+ mailing list</a>.
+ There is a
+ <a href="https://www.w3.org/Bugs/Public/buglist.cgi?product=WebAppsWG&component=UI%20Events&resolution=---&list_id=20132">bug tracker</a> for this specification.</p>
+
+ <p>
+ This document was published by the <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a> as a Working Draft.
+
+ This document is intended to become a <abbr title="World Wide Web Consortium">W3C</abbr> Recommendation.
+
+
+ If you wish to make comments regarding this document, please send them to
+ <a href="mailto:www-dom@w3.org">www-dom@w3.org</a>
+ (<a href="mailto:www-dom-request@w3.org?subject=subscribe">subscribe</a>,
+ <a href="http://lists.w3.org/Archives/Public/www-dom/">archives</a>).
+
+
+
+
+ All comments are welcome.
+
+ </p>
+
+
+ <p>
+ Publication as a Working Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr>
+ Membership. This is a draft document and may be updated, replaced or obsoleted by other
+ documents at any time. It is inappropriate to cite this document as other than work in
+ progress.
+ </p>
+
+
+
+ <p>
+
+ This document was produced by a group operating under the
+ <a id="sotd_patent" about="" rel="w3p:patentRules" href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent
+ Policy</a>.
+
+
+
+
+ <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/42538/status" rel="disclosure">public list of any patent
+ disclosures</a>
+
+ made in connection with the deliverables of the group; that page also includes
+ instructions for disclosing a patent. An individual who has actual knowledge of a patent
+ which the individual believes contains
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
+ Claim(s)</a> must disclose the information in accordance with
+ <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
+ 6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
+
+
+ </p>
+
+
+
+
+</div><div id="toc" class="section"><h2 class="introductory" id="h2_toc">Table of Contents</h2><ul class="toc" id="respecContents"><li class="tocline"><a href="#conformance" class="tocxref"><span class="secno">1. </span>Conformance</a></li><li class="tocline"><a href="#goals" class="tocxref"><span class="secno">2. </span>Goals</a></li><li class="tocline"><a href="#keyboard-events" class="tocxref"><span class="secno">3. </span>Keyboard Events</a><ul class="toc"><li class="tocline"><a href="#keyboard-event-interface" class="tocxref"><span class="secno">3.1 </span>Interface <code>KeyboardEvent</code></a><ul class="toc"><li class="tocline"><a href="#attributes" class="tocxref"><span class="secno">3.1.1 </span>Attributes</a></li><li class="tocline"><a href="#methods" class="tocxref"><span class="secno">3.1.2 </span>Methods</a></li></ul></li></ul></li><li class="tocline"><a href="#references" class="tocxref"><span class="secno">A. </span>References</a><ul class="toc"><li class="tocline"><a href="#normative-references" class="tocxref"><span class="secno">A.1 </span>Normative references</a></li></ul></li></ul></div>
+
+
+
+ <div id="conformance" typeof="bibo:Chapter" resource="#conformance" rel="bibo:Chapter" class="section">
+<!--OddPage-->
+<h2 id="h2_conformance"><span class="secno">1. </span>Conformance</h2>
+<p>
+ As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
+ and notes in this specification are non-normative. Everything else in this specification is
+ normative.
+</p>
+<p>
+ The key words <em class="rfc2119" title="MUST">MUST</em>, <em class="rfc2119" title="MUST NOT">MUST NOT</em>, <em class="rfc2119" title="REQUIRED">REQUIRED</em>, <em class="rfc2119" title="SHOULD">SHOULD</em>, <em class="rfc2119" title="SHOULD NOT">SHOULD NOT</em>, <em class="rfc2119" title="RECOMMENDED">RECOMMENDED</em>, <em class="rfc2119" title="MAY">MAY</em>,
+ and <em class="rfc2119" title="OPTIONAL">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a class="bibref" href="#bib-RFC2119">RFC2119</a></cite>].
+</p>
+
+ <p>All diagrams, examples, and notes in this specification are non-normative,
+ as are all sections explicitly marked non-normative. Everything else in
+ this specification is normative.</p>
+
+ <p>Requirements phrased in the imperative as part of algorithms(such as "strip
+ any leading space characters" or "return false and terminate these steps")
+ are to be interpreted with the meaning of the key word ("must", "should",
+ "may", etc) used in introducing the algorithm.</p>
+
+ <p>Conformance requirements phrased as algorithms or specific steps may be
+ implemented in any manner, so long as the end result is equivalent.
+ (In particular, the algorithms defined in this specification are intended
+ to be easy to follow, and not intended to be performant.)</p>
+
+ <p>User agents may impose implementation-specific limits on otherwise
+ unconstrained inputs, e.g. to prevent denial of service attacks, to guard
+ against running out of memory, or to work around platform-specific
+ limitations.</p>
+
+ <p>When a method or an attribute is said to call another method or attribute,
+ the user agent must invoke its internal API for that attribute or method so
+ that e.g. the author can't change the behavior by overriding attributes or
+ methods with custom properties or functions in ECMAScript.</p>
+
+ <p>Unless otherwise stated, string comparisons are done in a case-sensitive
+ manner.</p>
+
+ </div>
+
+ <div id="goals" typeof="bibo:Chapter" resource="#goals" rel="bibo:Chapter" class="section">
+
+<!--OddPage-->
+<h2 id="h2_goals"><span class="secno">2. </span>Goals</h2>
+ <p>UI Events builds on the event model defined in DOM Level 3 Events
+ (and also DOM4). Features in scope for this specification are:</p>
+
+ <ul>
+ <li>Additional Keyboard event properties to allow for physical key location scenarios</li>
+ </ul>
+ </div>
+
+
+ <div id="keyboard-events" typeof="bibo:Chapter" resource="#keyboard-events" rel="bibo:Chapter" class="section">
+
+<!--OddPage-->
+<h2 id="h2_keyboard-events"><span class="secno">3. </span>Keyboard Events</h2>
+ <p>This section extends the KeyboardEvent interface defined in DOM Level 3 by adding methods
+ for querying the keyboard state without requiring a Keyboard event to be dispatched, and by providing locale information during the dispatch of a Keyboard event.</p>
+
+ <div id="keyboard-event-interface" typeof="bibo:Chapter" resource="#keyboard-event-interface" rel="bibo:Chapter" class="section">
+ <h3 id="h3_keyboard-event-interface"><span class="secno">3.1 </span>Interface <code>KeyboardEvent</code></h3>
+
+ <pre class="idl"><span class="idlInterface" id="idl-def-KeyboardEvent">partial interface <span class="idlInterfaceID">KeyboardEvent</span> : <span class="idlSuperclass">UIEvent</span> {
+<span class="idlMethod"> static <span class="idlMethType">DOMString</span> <span class="idlMethName"><a href="#widl-KeyboardEvent-queryKeyCap-DOMString-DOMString-code-DOMString-locale">queryKeyCap</a></span> (<span class="idlParam"><span class="idlParamType">DOMString</span> <span class="idlParamName">code</span></span>, <span class="idlParam">optional <span class="idlParamType">DOMString</span> <span class="idlParamName">locale</span></span>);</span>
+<span class="idlAttribute"> readonly attribute <span class="idlAttrType">DOMString</span> <span class="idlAttrName"><a href="#widl-KeyboardEvent-locale">locale</a></span>;</span>
+<span class="idlMethod"> static <span class="idlMethType">DOMString</span> <span class="idlMethName"><a href="#widl-KeyboardEvent-queryLocale-DOMString">queryLocale</a></span> ();</span>
+};</span></pre><div id="attributes" class="section"><h4 id="h4_attributes"><span class="secno">3.1.1 </span>Attributes</h4><dl class="attributes"><dt id="widl-KeyboardEvent-locale"><code>locale</code> of type <span class="idlAttrType">DOMString</span>, readonly </dt><dd>
+ <p>The <code>locale</code> <code>DOMString</code> attribute contains a [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] tag indicating the locale for which the keyboard originating
+ the event is configured, e.g. <code>"en-US"</code>. The <code>locale</code> <em class="rfc2119" title="MAY">MAY</em> be the <a class="def" href="#glossary-empty-string">empty string</a> when inapplicable
+ or unknown, e.g. when this information is not exposed by the underlying platform.</p>
+
+ <div class="note"><div class="note-title" id="h_note_1"><span>Note</span></div><p class=""><strong>Note:</strong> <code>locale</code> does not necessarily indicate the locale of the data or the context in which
+ it is being entered. For example, a French user often might not switch to an English keyboard setting when typing English, in which case the <code>locale</code>
+ will still indicate French. Nor can it be used to definitively calculate the <q>physical</q> or <q>virtual</q> key associated with the event, or the character
+ printed on that key.</p></div>
+
+ <p>The <a class="def" href="#glossary-un-initialized-value">un-initialized value</a> of this attribute <em class="rfc2119" title="MUST">MUST</em> be <code>""</code> (the empty string).</p>
+ </dd></dl></div><div id="methods" class="section"><h4 id="h4_methods"><span class="secno">3.1.2 </span>Methods</h4><dl class="methods"><dt id="widl-KeyboardEvent-queryKeyCap-DOMString-DOMString-code-DOMString-locale"><code>queryKeyCap</code>, static</dt><dd>
+ <p>Given a <code>code</code> corresponding to a key on a standard keyboard and a [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] <code>locale</code>,
+ the <code>queryKeyCap</code> method returns the character that would be generated if that key were
+ pressed (without modifiers or any special modes in effect) while the specified keyboard <code>locale</code> is in effect.
+ Assuming that <code>locale</code> matches the user's physical keyboard, then this value will
+ match the value printed on the <em>keycap</em> (the cap placed over the key switch) on the keyboard.
+ </p>
+ <p>This method is intended to be used primarily for the
+ <em><a href="#key-alphanumeric-writing-system">writing system keys</a></em> because the values
+ generated by these keys vary based on the current keyboard locale. For keys not classified as
+ <em>writing system</em> keys or for keys that do not generate printable characters,
+ this function returns the <code>code</code> for the key (i.e., it
+ returns that same value that was passed in). Note that the <code class="key-code">'AltRight'</code>
+ key always returns 'AltRight', even though some locales have this key labeled
+ <code class="keycap">AltGr</code>.
+ </p>
+ <p>Dead keys should return the combining accent character.
+ </p>
+ <p>The value 'Undefined' is returned if the <code>locale</code>'s keyboard does not contain the key
+ specified by <code>code</code>.
+ </p>
+
+ <table class="parameters"><tbody><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">code</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span>✘</span></td><td class="prmOptFalse"><span>✘</span></td><td class="prmDesc">The code for the key, as defined in the <a href="#key-codes">Key Codes</a> section below.
+ </td></tr><tr><td class="prmName">locale</td><td class="prmType"><code>DOMString</code></td><td class="prmNullFalse"><span>✘</span></td><td class="prmOptTrue"><span>✔</span></td><td class="prmDesc">
+ <p>If specified, this should be a [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] tag (like 'en-US') that identifies the
+ keyboard layout in which to interpret the <code>code</code> parameter.<br />
+ If not specified, then the <code>code</code>
+ value is interpreted in the context of the 'en-US' locale.</p>
+ </td></tr></tbody></table><div><em>Return type: </em><code>DOMString</code></div></dd><dt id="widl-KeyboardEvent-queryLocale-DOMString"><code>queryLocale</code>, static</dt><dd>
+ <p>Returns the current keyboard locale as a [<cite><a class="bibref" href="#bib-BCP47">BCP47</a></cite>] string, such as 'en-US' or 'fr-FR'.
+ The value returned here is encoded the same as the value in the KeyboardEvent <code>locale</code>
+ attribute.
+ </p>
+ <div><em>No parameters.</em></div><div><em>Return type: </em><code>DOMString</code></div></dd></dl></div>
+
+ <div class="example"><div class="example-title example-num"><span>Example 1</span></div>
+ <p class="example-title">Calling <code>queryKeycap</code> for various keys
+ </p>
+ <pre>queryKeyCap('KeyA') => <code class="glyph">'a'</code> <span class="example-comment">Default locale is 'en-US'</span>
+queryKeyCap('KeyA', 'en-US') => <code class="glyph">'a'</code>
+queryKeyCap('KeyA', 'fr-FR') => <code class="glyph">'q'</code>
+queryKeyCap('Digit2', 'en-US') => <code class="glyph">'2'</code>
+queryKeyCap('Digit2', 'fr-FR') => <code class="glyph">'é'</code> ('\u00e9')
+queryKeyCap('IntlRo', 'en-US') => <code class="key-code">'Undefined'</code> <span class="example-comment">Key doesn't exist in US keyboard</span>
+queryKeyCap('IntlRo', 'ja-JP') => <code class="glyph">'ろ'</code> ('\u308d')
+queryKeyCap('Quote', 'nl-US') => <code class="glyph">'´'</code> ('\u0301') <span class="example-comment">Combining accent</span>
+queryKeyCap('Quote', 'ru-RU') => <code class="glyph">'э'</code> ('\u042d')
+queryKeyCap('Backquote', 'en-US') => <code class="glyph">'`'</code>
+queryKeyCap('Backquote', 'ja-JP') => <code class="key-code">'Backquote'</code> <span class="example-comment">Non-printable Halfwidth/Fullwidth Mode key</span>
+queryKeyCap('Space') => <code class="key-code">'Space'</code> <span class="example-comment">Non-printable</span>
+queryKeyCap('ShiftLeft') => <code class="key-code">'ShiftLeft'</code> <span class="example-comment">Non-printable</span>
+ </pre>
+ <p>
+ The value returned by <code>queryKeyCap</code> is suitable to be presented to a user (for example, in a
+ preferences dialog that allows the user to customize the key mappings) unless the returned value is
+ <code class="key-code">'Undefined'</code>
+ or if it is equal to the <code>code</code> that was passed in to the method.
+ </p>
+ </div>
+
+ <div class="example"><div class="example-title example-num"><span>Example 2</span></div>
+ <p class="example-title">Getting the current keycap for <code class="key-code">'KeyA'</code>
+ </p>
+ <pre>queryKeyCap('KeyA', queryLocale())
+ </pre>
+ </div>
+ </div>
+
+ </div>
+<!-- keyboard-events -->
+
+
+
+
+<div id="references" class="appendix section" typeof="bibo:Chapter" resource="#references" rel="bibo:Chapter">
+<!--OddPage-->
+<h2 id="h2_references"><span class="secno">A. </span>References</h2><div id="normative-references" typeof="bibo:Chapter" resource="#normative-references" rel="bibo:Chapter" class="section"><h3 id="h3_normative-references"><span class="secno">A.1 </span>Normative references</h3><dl class="bibliography" about=""><dt id="bib-BCP47">[BCP47]</dt><dd rel="dcterms:requires">A. Phillips; M. Davis. <a href="http://tools.ietf.org/html/bcp47"><cite>Tags for Identifying Languages</cite></a>. September 2009. IETF Best Current Practice. URL: <a href="http://tools.ietf.org/html/bcp47">http://tools.ietf.org/html/bcp47</a>
+</dd><dt id="bib-RFC2119">[RFC2119]</dt><dd rel="dcterms:requires">S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key words for use in RFCs to Indicate Requirement Levels.</cite></a> March 1997. Internet RFC 2119. URL: <a href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
+</dd></dl></div></div></body></html>
\ No newline at end of file