From d6b8d71f95b9c41b11de35a69269213e9902a5c8 Mon Sep 17 00:00:00 2001 From: Gareth Pursehouse Date: Tue, 17 May 2011 01:38:14 -0700 Subject: [PATCH] ctrl-enter in sql editor to submit query instead of having to click "go" button --- js/functions.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index fd8b36bf28..570f578ba1 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1195,7 +1195,12 @@ $(document).ready(function(){ } }); - $('#sqlquery').focus(); + $('#sqlquery').focus().keydown(function (e) { + if (e.ctrlKey && e.keyCode == 13) { + $("#sqlqueryform").submit(); + } + }); + if ($('#input_username')) { if ($('#input_username').val() == '') { $('#input_username').focus();