mousemove doesn't recognize "shiftkey is down", but only under Windows

Howard Bornstein bornstein at designeq.com
Sun Sep 23 00:03:43 EDT 2018


This is exceedingly weird. I can't get a mousemove handler to recognize if
the shiftkey is down (although I think this is true for all key
modifiers—Shiftkey down and OptionKey down for sure). The only way it
detects this state is if I click the mouse button while holding the
shiftkey down. Then it continues to return the correct state of the
shiftkey (including when the shiftkey is up), but after that can not detect
when it is down again without another mouseclick.

This is only the case under Windows. Under MacOS everything works fine.

Here's the simple test code:

*on* mousemove

   *if* the shiftkey is up *then*

      *put* the mouseloc && "Up"

   *else*

      *if* the shiftkey is down *then*

         *put* the mouseloc && "Down"

      *end* *if*

   *end* *if*

*end* mousemove

When the shiftkey is down, it isn't detected by this code unless the mouse
button is also clicked.

I'm running this under LiveCode Community 9.01 under Windows 7 via
Parallels Desktop on a Mac.

Why would this not work under Windows when it works perfectly under MacOS?
Any suggestions on how to get Livecode to recognize that the shiftkey is
down in a mousemove handler under Windows? Ideas and suggestions are
welcome.

-- 
Regards,

Howard Bornstein
-----------------------
www.designeq.com



More information about the use-livecode mailing list