mousewheel

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

mousewheel

Post by jmburnod »

Hi All

It is a way to capture the mousewheel to move an object ?

Best regards

Jean-Marc
BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG »

You can use the rawkey messages for that, but unfortunately i don't remember the exact number, so you have to try it yourself:

Code: Select all

on rawKeyUp theKey
  put theKey
  pass rawKeyUp
end rawKeyUp
put the code into a field, then use the scroll wheel while the curser is within said field.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Post by jmburnod »

Thanks,

theKeyNumber is 65308 for mouse wheel down
theKeyNumber is 65309 for mouse wheel up

Jean-Marc
Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm

Post by Nonsanity »

This does not seem to work on OS X. :(
~ Nonsanity
~ Chris Innanen
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark »

Chris,

I even got it working with a trackpad on Mac OS X.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm

Post by Nonsanity »

Actually, I think the problem was due to me VNCing to the machine running Revolution, PC to Mac. I don't think it's sending the wheel data exactly right. I can use it to scroll a web browser, so SOMETHING is getting through, but it doesn't trigger rawKeyUp at all.

As soon as I an the stack are in the same place, I'll test again. :)
~ Nonsanity
~ Chris Innanen
Post Reply