Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6611

Add [meta]-[Enter] js handler for query form submission

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The new ACE-based SQL query editor is great. Being able to submit the form without using a mouse would be even better.

      Adding:

       

      document.getElementById('queryForm')
       .addEventListener('keydown', function(e) {
       if (!(e.keyCode == 13 && e.metaKey)) return;
       if (e.target.form) doSubmitQueryWithUserName();
      });
      

      to ./exec/java-exec/src/main/resources/rest/query/query.ftl adds such support.

      I can file a PR with the code if desired.

      ------

      Functionality (for the documentation):

      This JIRA's commit introduces the following to Drill:

      When composing queries in the web query editor it is now possible to submit the query text by using the Meta+Enter key combination. This will trigger the same action as pressing the Submit button. On Mac keyboards Meta+Enter is Cmd+Enter. On Windows or Linux is Ctrl+Enter though Linux users may have keymapped the Meta key to another physical keyboard key.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kkhatua Kunal Khatua
            hrbrmstr Bob Rudis
            Arina Ielchiieva Arina Ielchiieva
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment