Accept all keys

How can I accept all keys and how I store the key pressed in a variable? is it possible?

May I do one accept for each key or there is an acceptAll method for that?

You can call:


Then you can do:

self.accept('anyButton', self.anyButtonMethod)

And your anyButtonMethod should accept one parameter, which will be the name of the button that was pressed.


thank you!

also, this link might help: