How to create a input macro in blender?

Hi, im working with gamekit with blender/ogre/c++, and for that, i need to save my blender project before test the game. I have changed the P button for start ogrekit instead of BGE, but i need to manually save the .blend every time for see the changes.

How i can do something like i press “P”, and automatic save the file (without asking) and play the game?

maybe with some python script?

help ;(

Hmm,…actually I never remapped the key for that, but if you use the ‘start game’ button in gamekit-plugin there is an auto-save. Now you will have to see where the difference is between the function that is called when you press the key and the button. I have no clue with this either…