Switching between play and pause at key P