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
-
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!
-
What would you like your binding to be able to do then?
-
@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)