Transform the character between living and dead states to get the key and escape
When your player is alive he can move right, left, jump, take the keys and escape the room. If the player takes any damage, they turn into a ghostly form and can fly and pass through obstacles. However the ghost can't take keys or escape.
To return to human form, the ghost must fly to the gravestone.
Remember that you have only 3 lives. Can you escape the room?