Javascript Keypad on Ipad

C

cipher_neo

Hi Guys,

I have a small keypad that I coded up with a set of divs that have an
onclick event attatched to them, which append a number to a string (as
you would expect with a keypad).

I need the keypad to be extra snappy on a touch screen, but it just
doesn't cut it at the moment.
It takes a few 10ths of a second to actually register that you have
pressed a key.

I want to make this as fast as possible and was wondering if anyone
has any tips on how I could do this?

The touch interface is the ipad at the moment.

The app is a POS web app, so it is essential that the keypad is really
responsive.
 
R

RobG

Hi Guys,

I have a small keypad that I coded up with a set of divs that have an
onclick event attatched to them, which append a number to a string (as
you would expect with a keypad).
Code?


I need the keypad to be extra snappy on a touch screen, but it just
doesn't cut it at the moment.
It takes a few 10ths of a second to actually register that you have
pressed a key.

That is very slow, but without the code all you'll get are guesses.

I want to make this as fast as possible and was wondering if anyone
has any tips on how I could do this?

I expect a single listener on an enclosing parent would be the
simplest implementation, but as to speed... where's the code to
compare with?

The touch interface is the ipad at the moment.

The app is a POS web app, so it is essential that the keypad is really
responsive.

POS? Where I come from that means "piece of s**t". Or do you mean
"point of sale"? :)
 
E

Eric Bednarz

The iOS event order for a tap is:

- touchstart
- touchend
- mouseover (first time only)
- mousedown
- mouseup
- click

For immediate response, I’d try the first one. :^)
It takes a few 10ths of a second to actually register that you have
pressed a key.

That is very slow, […]

That’s a feature. You can move your finger after touchstart away from
the element that might listen to mouse events and only touchend will
fire (well, and touchmove, and multitouch might make things generally
more involved, but you get the idea).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top