Use the arrow keys to move around. Get the key and put it in the lock then avoid pretty much everything. Get the gem and go to the blue door thing.
Note: This is almost impossible to do. It is not very likely, (not likely at all) to win.