Dr Strangelove

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Dr Strangelove

Post by richmond62 » Tue Jul 19, 2016 5:52 pm

a.k.a How I learnt to love my scroll-wheel mouse.

I have had an obsession with Pentominoes since I bought my sister a Spears Games version of that, knowing full
well that I'd end up playing with it . . . https://en.wikipedia.org/wiki/Pentomino

Anyway, I got bogged down a while back because I really didn't want to have a separate 'rotate' button for each of the 12 shapes:
pent1.png
pent1.png (766 Bytes) Viewed 5551 times
as all sorts of complications arose with drag-and-drop and so on.

Today; for no obvious reason, I started wondering if I could pick up a rawKeyDown signal from the scroll-wheel on my mouse.

Things went rather better than that as I picked up 2 different signals depending on which way I scrolled the wheel.
This really sorted out my previous problem:
code.png
code.png (29.61 KiB) Viewed 5551 times
the sample stack is here: https://www.dropbox.com/s/1tyxt1015z0h5 ... e.zip?dl=0

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Dr Strangelove

Post by [-hh] » Tue Jul 19, 2016 7:48 pm

Nice!
[Hold shiftkey down when scrolling to get two keys more: 65310 and 65311].
shiftLock happens

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Dr Strangelove

Post by richmond62 » Tue Jul 19, 2016 8:09 pm

Hold shiftkey down when scrolling to get two keys more: 65310 and 65311
Certainly not on Linux.

Which OS are you using?

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2262
Joined: Thu Feb 28, 2013 11:52 pm

Re: Dr Strangelove

Post by [-hh] » Tue Jul 19, 2016 8:25 pm

Yes, forgot to say, this is MacOS only.
[Thought you are using a PPC-Mac.]
Linux and Windows handle the modifier keys in a different way.
This differs also between platforms for "modifier- clicks".
shiftLock happens

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Dr Strangelove

Post by richmond62 » Tue Jul 19, 2016 9:03 pm

I do, indeed, use a PPC Mac: but Livecode's last version to run on that machine is 6.7,
so I'd be missing a lot were I to stick with that.

As far as I'm concerned I tend not to be interested in much that does not
work completely across the 3 desktop platforms Livecode is available for.

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Dr Strangelove

Post by AxWald » Wed Jul 20, 2016 10:54 am

Hi,

Win 10-64, german keyboard:

Scroll wheel gives 65308/ 65309. Always.

Shift (65505), Alt (65513), Win (L65388, R65399) and "menu" (65383) give their own key repeatedly - replacing the wheel key immediately after it registers.

Ctrl/ Strg doesn't give a rawKeyDown.

Have fun!
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Dr Strangelove

Post by MaxV » Fri Jul 22, 2016 4:48 pm

Mac, Linux, and Windows: scroolwhell is always 65308/ 65309.
I tested on Win and Linux.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10099
Joined: Fri Feb 19, 2010 10:17 am

Re: Dr Strangelove

Post by richmond62 » Fri Jul 22, 2016 5:59 pm

always 65308/ 65309
Very good to know!

Post Reply