Key press for menu popup, same key press to close menu?

At the moment i have a menu pop up. When the M key is pressed it slides on screen (playing an ipo). To close the menu, you press leftSHIFT and M (plays ipo in reverse). Is there a way it can be done so that a second keypress of M will close the menu rather than having to push two keys, or a different key, to close it?

Thanks

Sure. Use a Property to sore the Opening-Status of your Menue in. (True/False) So you can distinguish what the Key shall do next.

If Property is True, Menue is open -> press Key to close
If Property is False, Menue is close -> press to open

Doc

Thanks for reply. Having just done a night shift, now is probably not the best time to try it! On the logic i set up, it skips playing the ipo and ends up in finished position. I think in the logic i have just created a recurring loop :-?

Anyways i shall try later after some sleep. :smiley:

Just found this, works wonders.

https://blenderartists.org/forum/viewtopic.php?t=43730&highlight=scene

expressions, must remember about expressions