diff --git a/supervisor/shared/web_workflow/static/edit.js b/supervisor/shared/web_workflow/static/edit.js index 5d9e4fdfe3..d73a9db94c 100644 --- a/supervisor/shared/web_workflow/static/edit.js +++ b/supervisor/shared/web_workflow/static/edit.js @@ -30,4 +30,18 @@ function save() { document.querySelector("#save_btn").onclick = function () { console.log("Click Save!"); save(); +} + +let isCtrl = false; +document.onkeyup=function(e){ + if(e.keyCode === 17) isCtrl=false; +} + +document.onkeydown=function(e){ + if(e.keyCode === 17) isCtrl=true; + if(e.keyCode === 83 && isCtrl === true) { + //ctrl-s pressed + save(); + return false; + } } \ No newline at end of file