From c40fd1624db51b66cc3eaf469175e007c3bf8a46 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 11 Oct 2018 08:20:44 +1200 Subject: [PATCH] Added shortcuts for outputs --- web/events.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/events.js b/web/events.js index 0bf29c6..c9b3d87 100644 --- a/web/events.js +++ b/web/events.js @@ -6,6 +6,11 @@ document.onkeyup = (e) => if(e.target && e.target.id == "picker_input"){ return; } + // Output + if((e.ctrlKey || e.metaKey) && ch == "s"){ DOTGRID.save(); e.preventDefault(); return; } + if((e.ctrlKey || e.metaKey) && ch == "r"){ DOTGRID.render(); e.preventDefault(); return; } + if((e.ctrlKey || e.metaKey) && ch == "e"){ DOTGRID.export(); e.preventDefault(); return; } + if(ch == "backspace" && e.ctrlKey){ DOTGRID.theme.reset(); e.preventDefault(); } if(ch == "backspace"){ DOTGRID.tool.remove_segment(); e.preventDefault(); } if(ch == "escape"){ DOTGRID.tool.clear(); DOTGRID.picker.stop(); e.preventDefault(); }