Sha256: 26a0f9229e009cf54c7e3e4546fa8999d078b5f4b12af44ebfe76a1443fb85ba

Contents?: true

Size: 1.61 KB

Versions: 7

Compression:

Stored size: 1.61 KB

Contents

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
		"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Typematic Test</title>
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../../themes/tundra/tundra.css";
		@import "../css/dijitTests.css";
	</style>

	<script type="text/javascript" src="../../../dojo/dojo.js"
		djConfig="isDebug: true, debugAtAllCosts: true"></script>
	<script type="text/javascript">
		dojo.require("dijit._base.typematic");

		var lastCount = 0;
		function typematicCallBack(count, node, evt){
			var inputNode = dojo.byId('typematicInput');
			if (node == inputNode){
				key = "a";
			}else{
				key = "b";
			}
			if(-1 == count){
				console.debug((lastCount+1) + ' ' + key + ' events');
			}else{
				lastCount = count;
				inputNode.value += key;
			}
			inputNode.focus();
		}
		dojo.addOnLoad(function(){
			var keyNode = dojo.byId('typematicInput');
			var mouseNode = dojo.byId('typematicButton');
			dijit.typematic.addKeyListener(keyNode,
				{
					charOrCode:dojo.keys.F10,
					ctrlKey:true
				},
				this, typematicCallBack, 200, 200);
			dijit.typematic.addMouseListener(mouseNode,
				this, typematicCallBack, 0.9, 200);
			keyNode.focus(); // make it easier to type
		});
	</script>
</head>
<body class="tundra">

	<h2>Dijit typematic tests</h2>
	Press and hold the <b>ctrl+F10</b> keys to see a's typed (constant rate) in the input field,<br>
	or left-mouse click the button and hold down to see b's typed (increasing rate) in the input field.<br>
	<input id="typematicInput" size="500"><button id="typematicButton">to B or not to B</button>

</body>
</html>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dojo-pkg-1.132.0 data/dojo-release-1.3.2-src/dijit/tests/_base/test_typematic.html
dojo-pkg-1.120.0 data/dojo-release-1.2.0-src/dijit/tests/_base/test_typematic.html
dojo-pkg-1.121.0 data/dojo-release-1.2.1-src/dijit/tests/_base/test_typematic.html
dojo-pkg-1.122.0 data/dojo-release-1.2.2-src/dijit/tests/_base/test_typematic.html
dojo-pkg-1.123.0 data/dojo-release-1.2.3-src/dijit/tests/_base/test_typematic.html
dojo-pkg-1.130.0 data/dojo-release-1.3.0-src/dijit/tests/_base/test_typematic.html
dojo-pkg-1.131.0 data/dojo-release-1.3.1-src/dijit/tests/_base/test_typematic.html