Use Blender game engine with bpy, is it possible?
No the bge module is only available when the game engine is running. Similarly, the sensors and actuators that you setup with logic bricks will also only work in the game engine.

To write an operator that responds to events you want to look at a modal operator. You can also find a few examples in the script template files that are available in blender's text editor.