diff --git a/js_src/Keyboard.js b/js_src/Keyboard.js index 67e936d..cef211c 100644 --- a/js_src/Keyboard.js +++ b/js_src/Keyboard.js @@ -10,6 +10,7 @@ function initKeyboard() { switch (ch) { case 'c': clearDoodle(); break; + case 'n': clearDoodle(); break; case 'p': print(); break; case 'u': oopsUndo(); break; case 'e': settingsWindow.downloadGcode(); break; @@ -18,8 +19,11 @@ function initKeyboard() { case 'C': drawCircle(250,180,80,64); break; //x,y,r,res case 'T': drawCircle(250,180,80,3); break; //triangle case 'X': drawCircle(250,180,80,6); break; //hexagon - case 'H': previewUp(true); break; - case 'h': previewDown(true); break; + case 'h': previewUp(true); break; + case 'H': previewDown(true); break; + case 's': saveSketch(); break; + case 'L': nextDoodle(); break; + case 'l': prevDoodle(); break; case '[': previewTwistLeft(); break; case ']': previewTwistRight(); break; case '\'': resetTwist(); break; diff --git a/js_src/gcodeGenerating.js b/js_src/gcodeGenerating.js index 7afaa21..35eab62 100644 --- a/js_src/gcodeGenerating.js +++ b/js_src/gcodeGenerating.js @@ -145,6 +145,8 @@ function generate_gcode() { for (var layer = 0; layer < layers; layer++) { + gcode.push(";LAYER:"+layer); + var p = JSON.parse(JSON.stringify(points)); // [].concat(points); if (p.length < 2) return;