keyboard-layout-editor/test.html
Ian Prest 23e8f11c8c Refactored the serialization code to make it easier to maintain.
-- All the key defaults are now centralized.
2013-11-10 14:58:28 -05:00

24 lines
No EOL
335 B
HTML

<html>
<head>
<script>
var keys = [];
for(var i = 15; i >= 1; --i) {
keys.push({x:i,y:0});
}
keys.sort(function(a,b) {
console.log(a,b,a.y-b.y,a.x-b.x,(a.y - b.y) || (a.x - b.x));
return (a.y - b.y) ||
(a.x - b.x);
});
keys.forEach(function(key,i) { console.log(i, key.y, key.x); });
</script>
</head>
<body>
</body>
</html>