Detect scroll activity (when LC is not frontmost)

Terry Vogelaar tvogelaar at de-mare.nl
Sat Dec 24 03:42:26 CET 2016


Thank you, Craig and Mike, for your responses. But the problem with the rawKeyDown message is that the mouse needs to be in the LiveCode window. I can scroll in my web browser all day and LiveCode wouldn’t ever notice. So unfortunately this is not what I’m looking for.

Doing a feature request for a rawkeysdown function sounds like a good idea. 

Maybe there is something to the idea of hooking in to the system timer. Although I wouldn’t know how to do that either.


With kind regards,
Terry Vogelaar

> Op 23 dec. 2016, om 12:00 heeft use-livecode-request at lists.runrev.com het volgende geschreven:
> 
> From: dunbarx <dunbarx at aol.com <mailto:dunbarx at aol.com>>
> 
> Hi.
> 
> The "rawKeyDown" message can detect scrollWheel activity. The results are:
> 
> 65308 for a down scroll
> 65309 for an up scroll.
> 
> Craig Newman
> ------------------------------
> 
> From: Mike Bonner <bonnmike at gmail.com <mailto:bonnmike at gmail.com>>
> 
> I think the scroll wheel sends arrow keys, but since there isn't a
> "rawkeysdown()" function to match the keysdown() function it would require
> either an external or the function to be added with livecode builder. At
> which point I wonder.. Is there a way to hook in to the system timer?  (the
> one that decides if the screensaver/sleep mode should activate.)
> 
> No clue how to access such a thing. (Could go with the simple method and
> request a rawkeysdown() feature)
> ------------------------------
> 
> Actually, nevermind, the scroll wheel on my system doesn't trigger an arrow
> key press, but the arrowkeys are indeed picked up by keysdown. My
> apologies. :)
> 
> ------------------------------
> 
> From: dunbarx <dunbarx at aol.com <mailto:dunbarx at aol.com>>
> 
> I assume this discussion is still intact.
> 
> The "rawkeyDown" message may be trapped as follows:
> 
> on rawkeydown tkey
>   if  tkey = 65308 then doScrollDownStuff
>   else doScrollUpStuff 
> end rawkeydown



More information about the use-livecode mailing list