Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Javascript Keypad on Ipad

Reply
Thread Tools

Javascript Keypad on Ipad

 
 
cipher_neo
Guest
Posts: n/a
 
      06-09-2011
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.
 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      06-09-2011
On Jun 9, 3:55*pm, cipher_neo <(E-Mail Removed)> wrote:
> 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"?


--
Rob

 
Reply With Quote
 
 
 
 
Eric Bednarz
Guest
Posts: n/a
 
      06-09-2011
RobG <(E-Mail Removed)> writes:

> On Jun 9, 3:55*pm, cipher_neo <(E-Mail Removed)> wrote:


>> I have a small keypad that I coded up with a set of divs that have an
>> onclick event attatched to them,


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).

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
keypad repair martin loomis Computer Support 3 05-31-2004 07:18 PM
Re: windows xP and numeric keypad... Ralph Wade Phillips Computer Support 0 07-11-2003 02:29 PM
Re: windows xP and numeric keypad... Patrick Computer Support 0 07-11-2003 02:27 PM
Re: windows xP and numeric keypad... Brian H Computer Support 0 07-11-2003 01:53 PM



Advertisments