diff --git a/octoprint/static/js/ui.js b/octoprint/static/js/ui.js index eb7f54c..60cc136 100644 --- a/octoprint/static/js/ui.js +++ b/octoprint/static/js/ui.js @@ -1480,7 +1480,7 @@ $(function() { //~~ Terminal - $("#terminal-send").click(function () { + $("#terminal-send").click(function () { var command = $("#terminal-command").val(); if (command) { $.ajax({ @@ -1490,7 +1490,15 @@ $(function() { contentType: "application/json; charset=UTF-8", data: JSON.stringify({"command": command}) }) + $("#terminal-command").val('') } + + }) + + $("#terminal-command").keyup(function(event){ + if(event.keyCode == 13){ + $("#terminal-send").click() + } }) //~~ Gcode upload