Post Reply 
wait(-1) kinetic scrolling
11-04-2015, 05:16 PM
Post: #4
RE: wait(-1) kinetic scrolling
(11-04-2015 12:36 AM)fabila Wrote:  In a standard scrolling i get a list:
when i touch{0,x,x}, while scrolling {1,x,x}, when i stop touching {2}

in a kinetik scrolloing
when i touch{0,x,x}, while scrolling {1,x,x}, when i stop touching screen dont get nothing

How to identify a kinetic scrolling ?

sorry for my bad english

Use MOUSE() in addition to WAIT(-1). Have WAIT(-1) detect if mouse events occur, and if so, use the MOUSE() command to determine kinetic scrolling.

Code:

  LOCAL key;

  // change run to 0 to exit the while loop
  key:=WAIT(-1);
  CASE
    IF TYPE(key)==6 THEN
      // we have touchscreen events
      CASE
        IF key(1)==0 THEN kmMouseDown(); END; // do kinetic scrolling here
        IF key(1)==1 THEN kmMouseUp(); END;
        // ... more mouse events
        IF key(1)==7 THEN kmMouseLongClick(); END;

        kmMouseEvent(); // default handler
      END;
    END; // end of touch events

    // at this point, all touch events were handled due to the
    // TYPE(key)==6 check; so only key-presses are left
    // and if a touch event occurred, these tests below are
    // never reached

    IF key==0 THEN kmDoAppsKey(); END;
    // ... more key definitions here
    IF key==50 THEN kmDoPlusKey(); END;

    kmOtherEvents(); // handle all remaining undefined keys
  END;

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
wait(-1) kinetic scrolling - fabila - 11-04-2015, 12:36 AM
RE: wait(-1) kinetic scrolling - fabila - 11-04-2015, 03:53 PM
RE: wait(-1) kinetic scrolling - Han - 11-04-2015 05:16 PM



User(s) browsing this thread: 6 Guest(s)