Keypress

Hi guys

I’m trying to play a movie by pressing a keyboard key. “B” for example. It stops playing automatically. But when I press the key again it should start playing from where it stopped. Can you guys help me to create the appropriate code?