set the hilite of a button when the user press the shiftKey

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
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

set the hilite of a button when the user press the shiftKey

Post by jmburnod » Thu Mar 28, 2013 11:22 am

Hi All,

I search an way to set the hilite of a button when the user press the shiftKey on the keyboard.
I want avoid a pending message and I only found a dirty way by the mousemove :oops:

Code: Select all

on mousemove
   set the hilite of btn "bMultipleSelection" to (shiftKey() is down)
end mousemove
Best regards
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: set the hilite of a button when the user press the shift

Post by dunbarx » Thu Mar 28, 2013 1:44 pm

Jean-Marc.

It had to be the one key that sends no message, the shiftKey???

Are you adverse to using "idle"?

Craig

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

Re: set the hilite of a button when the user press the shift

Post by jmburnod » Thu Mar 28, 2013 2:54 pm

hi Craig,
Are you adverse to using "idle"?
If i can't do the same without it but it seems a loop is the only way
Best regards
Jean-Marc
https://alternatic.ch

Post Reply