Stylus event in LC

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
David.lc
Posts: 3
Joined: Fri Nov 13, 2020 9:23 am

Stylus event in LC

Post by David.lc » Fri Nov 13, 2020 9:42 am

Hello,
I would like to know if it is possible to capture the stylus event under LiveCode.
With the transition of my application from win7 to win10 there is a slight latency between the mouseDown and mouseMove event.
This creates inconvenience when a fast handwriting.

Have you ever observed this phenomenon?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10337
Joined: Wed May 06, 2009 2:28 pm

Re: Stylus event in LC

Post by dunbarx » Fri Nov 13, 2020 3:53 pm

Anyone know what a "stylus" event is?

David?

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10054
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Stylus event in LC

Post by FourthWorld » Fri Nov 13, 2020 4:45 pm

Can you share the code for the mouseMove and mouseup handlers?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

David.lc
Posts: 3
Joined: Fri Nov 13, 2020 9:23 am

Re: Stylus event in LC

Post by David.lc » Mon Nov 16, 2020 8:51 am

I used this code :

Code: Select all

local nowDrawing
    on mouseDoubleUp
       set the points of graphic "line" to empty
    end mouseDoubleUp

    on mouseDown
       put true into nowDrawing
       set the points of graphic "line" to the points of graphic "line" & cr & the mouseLoc
    end mouseDown

    on mouseMove
       if nowDrawing then set the points of graphic "line" to the points of graphic "line" & cr & the mouseLoc
    end mouseMove

    on mouseUp
       put false into nowDrawing
       set the points of graphic "line" to the points of graphic "line" & cr & cr
    end mouseUp
(on a win 10 tablet (no problem with Win7))
When I use the mouse everything is fine.
But when I use the stylus, there is a slight time between the first point drawn and the second.
This does not happen with Paint for example, only with applications coded with LiveCode.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10337
Joined: Wed May 06, 2009 2:28 pm

Re: Stylus event in LC

Post by dunbarx » Mon Nov 16, 2020 3:17 pm

Aha.

You meant you were drawing a shape using a stylus pad gadget instead of the mouse. My uninformed opinion is that the stylus gadget, not LC, is the issue.

Craig

David.lc
Posts: 3
Joined: Fri Nov 13, 2020 9:23 am

Re: Stylus event in LC

Post by David.lc » Tue Nov 17, 2020 9:34 am

The issue does not appear with Paint or The WhiteBoard but only with LC.
(I am using a tablet PC with its own stylus, no pad)

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10337
Joined: Wed May 06, 2009 2:28 pm

Re: Stylus event in LC

Post by dunbarx » Tue Nov 17, 2020 2:54 pm

Hmmm.

I have no way of testing this. Anyone use a stylus along with a mouse to do things on their computers?

Craig

Post Reply