Javascript Keypad on Ipad

Discussion in 'Javascript' started by cipher_neo, Jun 9, 2011.

  1. cipher_neo

    cipher_neo Guest

    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.
     
    cipher_neo, Jun 9, 2011
    #1
    1. Advertising

  2. cipher_neo

    RobG Guest

    On Jun 9, 3:55 pm, cipher_neo <> 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
     
    RobG, Jun 9, 2011
    #2
    1. Advertising

  3. cipher_neo

    Eric Bednarz Guest

    RobG <> writes:

    > On Jun 9, 3:55 pm, cipher_neo <> 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).
     
    Eric Bednarz, Jun 9, 2011
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?windows-1250?Q?Petr_Jake=9A?=
    Replies:
    11
    Views:
    1,543
  2. Replies:
    1
    Views:
    1,968
  3. Tianyi Chen
    Replies:
    4
    Views:
    414
    Greg R. Broderick
    May 8, 2007
  4. leccy_eng

    keypad encoder

    leccy_eng, Mar 1, 2010, in forum: VHDL
    Replies:
    0
    Views:
    1,880
    leccy_eng
    Mar 1, 2010
  5. RoDzZzZ

    virtual keypad! see!

    RoDzZzZ, Aug 14, 2003, in forum: Javascript
    Replies:
    1
    Views:
    132
    Tim Slattery
    Aug 15, 2003
Loading...

Share This Page