svg2: add early draft of keyboard event inclusion

details:   https://svgwg.org/hg/svg2/rev/917575fda3e0
branches:  
changeset: 528:917575fda3e0
user:      Richard Schwerdtfeger <schwer@us.ibm.com>
date:      Mon Jul 22 15:21:29 2013 -0500
description:
add early draft of keyboard event inclusion

diffstat:

 master/interact.html |  44 ++++++++++++++++++++++++++++++++++++++++++++
 master/script.html   |   3 +++
 2 files changed, 47 insertions(+), 0 deletions(-)

diffs (104 lines):

diff --git a/master/interact.html b/master/interact.html
--- a/master/interact.html
+++ b/master/interact.html
@@ -188,16 +188,23 @@ using the <code>createEvent</code> metho
 or be cancelable with the
 <a class='idlattr' href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-Event-initEvent'>initEvent</a>
 method.</p>
 
 <p class="issue">Having all these SVG-specific duplicates of standard DOM events isn't
 ideal.  How much can we remove?  SVGLoad in particular, and how it is currently
 required to fire for every element.</p>
 
+<p class="issue">DOM 2 has no keyboard events in it. The only normative spec. on this is a new <a href="https://dvcs.w3.org/hg/d4e/raw-file/default/source_respec.htm">UI events spec. that should become a public working draft soon. This is areplacement for the DOM 3 Events spec. The group needs to discuss the current limitation in using DOM 2 events. Also, DOMActivate does not appear in the UI Events Spec. Regarding the activate event, user agents treat click the same as activate. 
+</a>
+
+Having all these SVG-specific duplicates of standard DOM events isn't
+ideal.  How much can we remove?  SVGLoad in particular, and how it is currently
+required to fire for every element.</p>
+
     <table  class="vert event-table">
       <tr>
         <th>Event name and description</th>
         <th>DOM2 name</th>
         <th>DOM2 category</th>
         <th>Event attribute name</th>
       </tr>
       <tr>
@@ -231,16 +238,53 @@ required to fire for every element.</p>
         <td>DOMActivate</td>
         <td><a
         href="http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-UIEvent">
         UIEvent</a></td>
         <td><a
         href="script.html#OnActivateEventAttribute">onactivate</a></td>
       </tr>
       <tr>
+        <td id="KeyDownEvent"><p class="event-name"><strong>keydown</strong></p>
+        <p>Occurs when a key is pressed down. The keydown event type is device dependent and relies on the capabilities         of the input devices and how they are mapped in the operating system.
+        </p></td>
+        <td>(same)</td>
+        <td><a
+        href="https://dvcs.w3.org/hg/d4e/raw-file/default/source_respec.htm#keyboard-events">
+        KeyboardEvent</a></td>
+        <td><a
+        href="script.html#OnKeyDownEventAttribute">onkeydown</a></td>
+      </tr>
+      <tr>
+        <td id="KeyPressEvent"><p class="event-name"><strong>keypress</strong></p>
+        <p> Occures when a key is pressed down, if and only if that key normally produces 
+        a character value. The keypress event type is device dependent and relies on the 
+        capabilities of the input devices and how they are mapped in the operating system.
+        </p></td>
+        <td>(same)</td>
+        <td><a
+        href="https://dvcs.w3.org/hg/d4e/raw-file/default/source_respec.htm#keyboard-events">
+        KeyboardEvent</a></td>
+        <td><a
+        href="script.html#OnKeyPressEventAttribute">onkeypress</a></td>
+      </tr>
+      <tr>
+        <td id="KeyUpEvent"><p class="event-name"><strong>keyup</strong></p>
+        <p>A user agent must dispatch this event when a key is released. The keyup event 
+        type is device dependent and relies on the capabilities of the input devices and 
+        how they are mapped in the operating system.
+        </p></td>
+        <td>(same)</td>
+        <td><a
+        href="https://dvcs.w3.org/hg/d4e/raw-file/default/source_respec.htm#keyboard-events">
+        KeyboardEvent</a></td>
+        <td><a
+        href="script.html#OnKeyUpEventAttribute">onkeyup</a></td>
+      </tr>
+      <tr>
         <td id="ClickEvent"><p class="event-name"><strong>click</strong></p>
         <p>Occurs when the pointing device button is clicked over
         an element. A click is defined as a mousedown and mouseup
         over the same screen location. The sequence of these events
         is: <code>mousedown</code>, <code>mouseup</code>,
         <code>click</code>. If multiple clicks occur at the same
         screen location, the sequence repeats with the
         <code>detail</code> attribute incrementing with each
diff --git a/master/script.html b/master/script.html
--- a/master/script.html
+++ b/master/script.html
@@ -236,16 +236,19 @@ specified on it.)</p>
 
 <div class="adef-list">
   <p><em>Attribute definitions:</em></p>
   <dl>
     <dt id="OnFocusInEventAttribute"><span class="adef">onfocusin</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnFocusOutEventAttribute"><span class="adef">onfocusout</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnActivateEventAttribute"><span class="adef">onactivate</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnClickEventAttribute"><span class="adef">onclick</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
+    <dt id="OnKeyDownEventAttribute"><span class="adef">onkeydown</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
+    <dt id="OnKeyPressEventAttribute"><span class="adef">onkeypress</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
+    <dt id="OnKeyUpEventAttribute"><span class="adef">onkeyup</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnMouseDownEventAttribute"><span class="adef">onmousedown</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnMouseUpEventAttribute"><span class="adef">onmouseup</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnMouseOverEventAttribute"><span class="adef">onmouseover</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnMouseMoveEventAttribute"><span class="adef">onmousemove</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dt id="OnMouseOutEventAttribute"><span class="adef">onmouseout</span> = "<span class="attr-value"><a href='types.html#DataTypeAnything'>&lt;anything&gt;</a></span>"</dt>
     <dd>Specifies some script to execute when "bubbling" or "at target"
     phase listeners for the corresponding event are fired on the element
     the attribute is specified on.  See the <a href='interact.html#SVGEvents'>Complete list of support events</a>

Received on Monday, 22 July 2013 20:24:02 UTC