I'd like to detect if a user has double tapped on an ipad or iphone.
Does a javascript-event exist which would provide this functionality?
Turn on Back Tap Check that you have the latest version of iOS on your iPhone 8 or later. Go to Settings > Accessibility > Touch, and tap Back Tap. Tap Double Tap or Triple Tap and choose an action. Double or triple tap on the back of your iPhone to trigger the action you set.
Question: Q: Double tap not working It might be that you're not tapping fast enough if neither works for you. You can adjust the speed by which you're expected to double-tap by going to Settings > Accessibility > Side Button.
Did you know you can double tap the back of your iPhone to lock your screen? Through the Back Tap feature, you can do just that and more. The feature came with iOS 14, and should work with most iPhones.
This could be used for a double tap or a double click. In pure javascript:
var mylatesttap; function doubletap() { var now = new Date().getTime(); var timesince = now - mylatesttap; if((timesince < 600) && (timesince > 0)){ // double tap }else{ // too much time to be a doubletap } mylatesttap = new Date().getTime(); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With