From ad0bc43eeb5c42b67646f1d06d01918fcdb50264 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Wed, 29 Oct 2014 18:53:20 -0500 Subject: [PATCH] Implement cmd+enter/control+enter key binding for query editor, via @abourget --- static/js/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/static/js/app.js b/static/js/app.js index 0b546b4..13321d5 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -253,6 +253,17 @@ function initEditor() { editor.getSession().setMode("ace/mode/pgsql"); editor.getSession().setTabSize(2); editor.getSession().setUseSoftTabs(true); + + editor.commands.addCommand({ + name: "run_query", + bindKey: { + win: "Ctrl-Enter", + mac: "Command-Enter" + }, + exec: function(editor) { + runQuery(); + } + }); } $(document).ready(function() {