Navigation

    APPDRAG Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular

    REMINDER

    Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

    Option to bind keystrokes to button

    Features requests
    2
    3
    233
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dick Honing
      Dick Honing last edited by

      would be nice if we can bind a keystroke to a button, for example ctrl-S/cmd-S to a Save button, etc.

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • Wassim
        Wassim last edited by

        What would you like your binding to be able to do then?

        1 Reply Last reply Reply Quote 0
        • Dick Honing
          Dick Honing last edited by

          @Wassim click that button. I now use the following code to achieve this:

          document.addEventListener("keydown", function(e) {
              if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {
                  e.preventDefault();
                      document.getElementById("saveButton").click();
                  }
              }
          }, false)
          1 Reply Last reply Reply Quote 0
          • First post
            Last post