pointvec/scripts/keyboard.js

16 lines
347 B
JavaScript
Raw Normal View History

2016-12-31 12:37:10 -05:00
function Keyboard()
{
this.listen = function(event)
{
console.log(event.keyCode);
2016-12-31 12:56:25 -05:00
switch (event.keyCode) {
2016-12-31 12:37:10 -05:00
case 65 : dotgrid.draw_arc_a(); break;
case 83 : dotgrid.draw_arc_c(); break;
case 68 : dotgrid.draw_line(); break;
case 70 : dotgrid.reset(); break;
2016-12-31 12:47:37 -05:00
case 71 : dotgrid.erase(); break;
2016-12-31 12:37:10 -05:00
}
}
}