Update of /cvsroot/dynapi/dynapi/examples
In directory usw-pr-cvs1:/tmp/cvs-serv19685/examples

Added Files:
        dynapi.ext.keyevents.html 
Log Message:
Initial import of the KeyEvents

--- NEW FILE ---
<html>
<head>
<title>DynAPI Examples - Key Events</title>
<script language="Javascript" src="../src/dynapi.js"></script>
<script language="Javascript">
DynAPI.setLibraryPath('../src/lib/');
DynAPI.include('dynapi.api.*');
DynAPI.include('dynapi.ext.keyevents.js');
</script>
<script language="Javascript">

DynAPI.onLoad = function() {
        myLayer = new DynLayer();
        
        myLayer.setSize(200,50)
        myLayer.setBgColor('#c0c0c0')
        myLayer.moveTo(100,100)
        myLayer.setHTML("Press any alphabetic key to see it's keycode.")

        DynAPI.document.addChild(myLayer);

        myListener = new EventListener(DynAPI.document)

        myListener.onkeyup=function(e) { 
                if (!e.controlKey) alert('You pressed the \''+e.curKey+'\' key 
(keycode '+e.which+')')
        }

        DynAPI.document.addEventListener(myListener)
}

</script>
</head>

<body bgcolor="#ffffff">

</body>
</html>


_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs

Reply via email to