Use the arrow keys to move, don't touch the octopus, collect the key, then go to the treasure chest. It is possible, just hard