Post Reply 
Efficient Use of Using both GETKEY and Soft Keys
08-12-2018, 06:42 PM
Post: #5
RE: Efficient Use of Using both GETKEY and Soft Keys
Tyann, thank you so much, the program works a lot better!

Here is a new revised TEST5793. Key clicks return getkey numbers, mouse clicks return x and y pixel information. Only clicks are accepted, drags and holds are not acknowledged.
Code:

EXPORT TEST5793()
BEGIN
LOCAL K,T;
REPEAT

// get input and type
K:=WAIT(-1);
T:=TYPE(K);

// if input is a key (real number)
IF T==0 THEN
PRINT(K);
END;

// if input is a click (touch)
// type 6 is a list
IF T==6 AND K(1)==3 THEN
// we want clicks only (wait event 3)
// on event 3, {3, x, y}
PRINT(B→R(K(2))+" , "+B→R(K(3)));
CONTINUE;
END;


UNTIL T==0 AND K==4; // ESC key
END;
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Efficient Use of Using both GETKEY and Soft Keys - Eddie W. Shore - 08-12-2018 06:42 PM



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