shortcut for tare
This commit is contained in:
parent
78b2fc74bf
commit
183f727085
1 changed files with 8 additions and 0 deletions
|
|
@ -94,12 +94,20 @@
|
||||||
//Remove the TareValue from the returned value
|
//Remove the TareValue from the returned value
|
||||||
forceTextElement.innerHTML = Math.round((ForceValue * 385) - TareValue) + " grams";
|
forceTextElement.innerHTML = Math.round((ForceValue * 385) - TareValue) + " grams";
|
||||||
}
|
}
|
||||||
|
function tareShortcut(e) {
|
||||||
|
// this would test for whichever key is 116 and the ctrl key at the same time
|
||||||
|
if (e.ctrlKey && e.keyCode == 116) {
|
||||||
|
// call your function to do the thing
|
||||||
|
pauseSound();
|
||||||
|
}
|
||||||
|
}
|
||||||
(function() {
|
(function() {
|
||||||
touchElement.addEventListener('touchstart', onTouchStartMove, false);
|
touchElement.addEventListener('touchstart', onTouchStartMove, false);
|
||||||
touchElement.addEventListener('touchmove', onTouchStartMove, false);
|
touchElement.addEventListener('touchmove', onTouchStartMove, false);
|
||||||
touchElement.addEventListener('touchend', onTouchEnd, false);
|
touchElement.addEventListener('touchend', onTouchEnd, false);
|
||||||
touchElement.addEventListener('webkitmouseforcewillbegin', checkMacForce, false);
|
touchElement.addEventListener('webkitmouseforcewillbegin', checkMacForce, false);
|
||||||
touchElement.addEventListener('webkitmouseforcechanged', checkMacForce, false);
|
touchElement.addEventListener('webkitmouseforcechanged', checkMacForce, false);
|
||||||
|
document.addEventListener('keyup', tareShortcut, false);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue