conflit with use of RawKeyUp message

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
fm31
Posts: 22
Joined: Tue Apr 23, 2013 2:08 pm

conflit with use of RawKeyUp message

Post by fm31 » Fri Feb 26, 2016 11:05 am

hello

this is a new problem for experts

I have a stack and on the card, I have many groups named "group_ER" composed with buttons / fields. when I click on a button of one of these groups , it opens a group named "menu A" in which we have buttons and one field. when the menu "menu A" opens, I force the focus on its field and then, directly we can use the numeric keyboard to enter data (if we want)

every things were Ok until some people asked me the possibility to open another menu (menu B) from a group "group_ER" with the used of the key "space" of the keyboard as soon as the cursor is above a group "gp_ER"

and then, I dont find a good solution :

when I put rawKeyDown message to catch space key in the script card, an testing if the mouse is above a group "gp_ER" when pressing space key, its opens the "menu_B" .... BUT impossible to use functionKey, escapeKey message (they are catch by the rawKeyUp handler) , and for others menu, the field doesn't word even I click inside

If I put rawKeyDown message in the group "gp_ER" , it doesn't work too

is there some one who help me to resolve this prob ?

Best regard

François

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

Re: conflit with use of RawKeyUp message

Post by dunbarx » Fri Feb 26, 2016 3:05 pm

Hi.

Can you post the stack? It may be simply that you need to pass the functionKey and escapeKey messages in your handlers. But I would need to see what is really going on. Others may have a better understanding of your question.

Craig Newman

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: conflit with use of RawKeyUp message

Post by jacque » Fri Feb 26, 2016 5:56 pm

Use keyUp (or keyDown) instead of rawKeyUp. RawKeyUp is sent first in the message order and will catch control keys, then keyUp is sent and will catch the space.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

fm31
Posts: 22
Joined: Tue Apr 23, 2013 2:08 pm

Re: conflit with use of RawKeyUp message

Post by fm31 » Mon Feb 29, 2016 2:21 pm

hello

thanks to dunbarx and Jacque for your answers

Jacque, you have right. I tried it this morning and this is the best solution.

Francois

Post Reply