6 XML Events Integration

Dean, and WG

excuse me interrupting your deliberations.

I have read http://www.w3.org/TR/SVG12/ and find it relatively  
impenetrable and intractable, my apologies.

The issue I wish to raise regards monitoring of keyboard input.

if a user holds one key down, and at the same time taps another key  
what events are captured?

I'd suggest that, for any number of keys, until an onkeyup event is  
fired, onkeydown should be.

To my understanding this isn't the current status.

thanks


Jonathan Chetwynd
http://www.peepo.co.uk     "It's easy to use"
irc://freenode/accessibility


as an example: http://www.peepo.co.uk/sim/sim.svg (unfortunately  
unstable so code appended)

when pressing arrow keys up and left, 'terrain' should transform  
diagonally. which isn't the current status.

onkeydown continues to fire, until another key is pressed, at which  
time it stops.

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
     "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"
      [<!ENTITY guis "http://www.peepo.co.uk/temp/gui-schema#">]>
<svg xmlns="http://www.w3.org/2000/svg"
      xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:a="http://www.adobe.com/svg10-extensions"
      a:timeline="independent"

width="100%" height="100%"
onkeydown='press(evt)'
 >

<defs>
<metadata>
<rdf:RDF xmlns="http://web.resource.org/cc/"  
xmlns:dc="http://purl.org/dc/elements/1.1/"  
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"  
xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:guis="&guis;">

<Work rdf:ID="menu"> <dc:type guis:resource="&guis;menu" /></Work>
<Work rdf:ID="toc"> <dc:type guis:resource="&guis;toc" /></Work>
<Work rdf:ID="symbol11"> <dc:type guis:resource="&guis;trademark"  
/></Work>

<Work rdf:ID="border"> <dc:type guis:resource="&guis;style-control"  
/></Work>
<Work rdf:ID="opacity"> <dc:type guis:resource="&guis;style-control"  
/></Work>
<Work rdf:ID="sound"> <dc:type guis:resource="&guis;style-control"  
/></Work>

<Work rdf:about="http://www.peepo.co.uk/">
   <dc:title xml:lang="en">A web directory that uses pictures</dc:title>
     <dc:title xml:lang="es">Un directorio web basado en  
imágenes</dc:title>
   <dc:description xml:lang="en">a basic 2D simulation</dc:description>
   <dc:creator><Agent><dc:title  
xml:lang="cy"><foaf:Person><foaf:name>Jonathan  
Chetwynd</foaf:name><foaf:mbox>j.chetwynd@btinternet.com</foaf:mbox></ 
foaf:Person></dc:title></Agent></dc:creator>
   <dc:rights><Agent><dc:title  
xml:lang="cy"><foaf:Person><foaf:name>Jonathan  
Chetwynd</foaf:name><foaf:mbox>j.chetwynd@btinternet.com</foaf:mbox></ 
foaf:Person></dc:title></Agent></dc:rights>
   <dc:date>2004/10/11</dc:date>
   <dc:format>image/svg+xml</dc:format>
   <dc:type  
rdf:resource="http://purl.org/dc/dcmitype/InteractiveResource" />
   <license rdf:resource="http://web.resource.org/cc/PublicDomain" />

</Work>
<License rdf:about="http://web.resource.org/cc/PublicDomain">
    <permits rdf:resource="http://web.resource.org/cc/Reproduction" />
    <permits rdf:resource="http://web.resource.org/cc/Distribution" />
    <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</License>
</rdf:RDF>
</metadata>

<script type="text/javascript"><![CDATA[

         var countx = 20;
         var county = 20;
         var acc=0.25

         function press(evt) {
             if ( window.svgDocument == null )
                 svgDocument = evt.target.ownerDocument;
                      var key = evt.getKeyCode();
                 var obj = svgDocument.getElementById("terrain");
      if ( 81 == key ) {
                 acc=acc*2
                  }
                      if ( 65 == key ) {
                 acc=acc/2
                  }
                      if ( 37 == key ) {
                 countx=countx-acc
                 percount=countx + "%"
                 obj.setAttribute("x",percount)
                  }
                     if ( 39 == key ) {
                 countx=countx+acc
                 percount=countx + "%"
                 obj.setAttribute("x",percount)
             }
                                 if ( 38 == key ) {

                 county=county-acc
                 percount=county + "%"
                 obj.setAttribute("y",percount)
             }
                                 if ( 40 == key ) {
                 county=county+acc
                 percount=county + "%"
                 obj.setAttribute("y",percount)
             }

         };


]]></script>

<symbol id="form" viewBox="0 0 150 150" >
<path d="M55 145 L95 145 L75 112 z"  fill="#085" />

<rect x="5" y="65" width="27" height="27" fill="#f00" />

<rect x="37" y="65" width="27" height="27" fill="#f00" />
<rect x="5" y="96" width="140" height="15" fill="#ff0" />

<circle cx="125" cy="80" r="13" fill="#00f" />
<circle cx="125" cy="50" r="13" fill="#00f" />
<circle cx="125" cy="20" r="13" fill="#00f" />
</symbol>

</defs>

    <rect x="0" y="0" width="100%" height="100%" fill="#cca"  
stroke="none"  />
    <rect x="0" y="80" width="100%" height="100%" fill="#cc9"  
stroke="none" />

    <g >
      <title>form and number</title>
      <a xlink:href="http://www.peepo.co.uk/launch/form.svg">
        <use id="terrain"  xlink:href="#form" x="20%" y="20%"   
width="50%" height="50%" stroke="none" />
      </a>
    </g>

</svg>

Received on Friday, 8 October 2004 16:45:47 UTC