Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-15711

Submitting comments with keyboard shortcut should use OS specific shortcut

    XMLWordPrintable

    Details

    • Feedback Policy:

      Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Description

      The keyboard shortcut to submit a comment is currently CTRL+Enter, however on a Mac, the equivalent shortcut should be CMD+Enter.

      In Bitbucket Server we detect the OS and use something like the following to figure out whether the event was one of the aforementioned shortcuts:

      /* Return true if the ctrlKey is held down, or metaKey on Mac */
      function isCtrlish(e) {
          return isMac ? e.metaKey : e.ctrlKey;
      }
      
      /* Return true if the ctrlKey is held down (or metaKey on Mac) as well as the enter key */
      function isCtrlEnter(e) {
          return isCtrlish(e) && e.which === AJS.keyCode.ENTER;
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jvanderloo@atlassian.com John Van Der Loo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: