Capture Keystrokes & MouseMovements without being in focus?

Mike Bonner bonnmike at
Fri Jul 6 06:23:16 CEST 2018

The only way I know of is to start a relatively fast send loop and check
the keysdown().  For some things it works fine but for most other things
its not a good answer since you can see if a key is down, but not how long
its down, or tell if it has been pressed, then pressed again before the
next loop cycle. All you can do is see that the key IS down.

If you wanted to say.. Have a loop processing something in the background,
you could have it check the keysdown for <whatever keys you want here> and
if they're present, use revspeak to say how far along the process is.  If
you want to do a real, accurate logging of keys though, I'd say its a no go.

On Thu, Jul 5, 2018 at 9:43 PM Tom Glod via use-livecode <
use-livecode at> wrote:

> Hi folks,
> Is it possible to still trigger the rawKey message or the mousemove
> message? when the LC stack is not in focus?
> I know can can sort of create my own mousemove message by tracking the
> absolute (or is it relative) location of the mouse
> but the rawkey up message seems like a no go for any kind of workaround
> is there something i don't know about?
> on rawup
> I want to add 1 to MyStats["Keystrokes"]
> end rawup
> I'm afraid the answer is unless by some miracle ...
> Thank you.
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list