"Press any key" problem[solved]

Hi, for my credits scene I need to any key input, even mouse, to trigger an event. I have searched a bit and found:


But how would I use this to achieve my objective? An example would be very nice

Thanks in advance for any help

ButtonDownEvent means the event generated if any button is down. As usual, if you want to respond to an event, you need to accept it.

I think I just needed a good night of sleep. Here´s my solution:

base.buttonThrowers[0].node().setButtonDownEvent('button') #at class __init__

if curScene == 'Credits': #inside Task
self.accept( 'button', self.changeScene)
curScene = '' 

def changeScene(self, key):
	sceneFSM.request('Mmenu') #request to FSM main menu scene
	self.ignore('button') #stop listening for "press any key" event, so this will only work if curscene = 'Credits'

Thanks for the help!

What is the additional argument for in the function to be called?