Mouse up

Hi,
How to do mouse up event? In my case Tap is not working.
I am making a menu, I have a button on main scene and another button in an overlay scene, both on same place. If I click the overlay button, both button gets clicked, even if Tap is on. I could not figure out how to make the mouse up event.

Never mind. I solved it other way.

Mouse -> (nand)

Sorry, forgot to mention I was looking for python function for mouse up. Thank you for the reply.

Oh well, why not post an answer anyway?

import bge
cont = bge.logic.getCurrentControler()
mouse = cont.sensors['Mouse']

# value 1 means "just pressed", 2 means "pressed longer", 3 means "just released"
if mouse.getButtonStatus(bge.events.RIGHTMOUSE) == 3:
   do_your_thing()