kkhatua commented on a change in pull request #1392: Implements DRILL-6611 to
enable meta-enter query submission in web query interface
URL: https://github.com/apache/drill/pull/1392#discussion_r204515752
##########
File path: exec/java-exec/src/main/resources/rest/query/query.ftl
##########
@@ -111,6 +111,12 @@
enableBasicAutocompletion: true,
enableLiveAutocompletion: false
});
+ // meta-enter to submit query
+ document.getElementById('queryForm')
+ .addEventListener('keydown', function(e) {
+ if (!(e.keyCode == 13 && e.metaKey)) return;
Review comment:
Folks familiar with Mac tell me the Meta key has been deprecated and since
Ctrl is available on Mac, let's go with that combination: `Ctrl + Enter`
Also, check for `keyCode == 10` (Refer:
https://bugs.chromium.org/p/chromium/issues/detail?id=79407 )
This doesn't seem to be listed anymore, but might be worth having to ensure
compatibility.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services