I'm getting some strange results from the Pre touch sensor.
The sensor when swiped left should acts as though the ESC (KEY(1)) key has been pressed. Right swipe is the same as TAB (KEY(15)).
Try this code -
ALLOWESCAPE FALSE
LOCAL value, press, quit
WHILE quit=0
IF KEY(1) AND press=0
DEC value
press=10
ENDIF
IF KEY(15) AND press=0
INC value
press=10
ENDIF
IF press>0 THEN DEC press
PRINT "VALUE "+value,10,30
SHOWSCREEN
WEND
It does work. Kind of. The value does go up and down (depending on your swipe direction), but they are not instant or consistent and sometimes require multiple swipes, or sometimes just keep counting (up or down). when you are not swiping or touching the sensor.
It's as if it takes a while for the touch sensor to register any swipes, then remembers the swipe value and keeps sending it back to the program.
Is there a better way of getting the actual results - in real-time, consistently?
I think I sort of have a "feature" here to fix, still.
I'll do my best. BTW: left swipe was not backspace key?
Hi Gernot
No, left swipe is definitely KEY(1)=ESC and right swipe is KEY(15) =TAB, according to a key test routine I wrote. The code above uses those values and does work (to a degree). I'll give it a try with BACKSPACE later though, just to test.