# HG changeset patch # User Atul Varma # Date 1271095686 25200 # Node ID 8615b4b2de0c1ef91c150a3de108be4d1f87c466 # Parent 2c8d987416b34300f110571d9653c792c344a086 Added sample HTML/JS code. diff -r 2c8d987416b3 -r 8615b4b2de0c html/sample.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/html/sample.html Mon Apr 12 11:08:06 2010 -0700 @@ -0,0 +1,8 @@ + + +Sample Quasimode Code + + +

Hi.

+ + diff -r 2c8d987416b3 -r 8615b4b2de0c html/sample.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/html/sample.js Mon Apr 12 11:08:06 2010 -0700 @@ -0,0 +1,24 @@ +var QUASIMODE_EVENTS = ["quasimodestart", + "quasimodeend", + "quasimodekeyup", + "quasimodekeydown"]; + +quasimode.setPosition(0, 0); +quasimode.setSize(320, 240); +quasimode.log("Hello. window.quasimode is " + window.quasimode + "."); + +QUASIMODE_EVENTS.forEach( + function(name) { + document.addEventListener( + name, + function(event) { + quasimode.log(event.type + + " ctrl:" + event.ctrlKey + + " alt:" + event.altKey + + " meta:" + event.metaKey + + " shift:" + event.shiftKey + + " keyLocation:" + event.keyLocation); + }, + false + ); + });