F12 Should NOT Close the game
At least without warning. I was typing to a friend, went to hit backspace hit F12 by accident (wasn't really paying attention), and the game just closed without warning.
When I went back to reload the game, the game thankfully still had a record of me in my dungeon, but it froze and never loaded!
Quite upset at the moment. At the very least make it Alt+F12, because just F12 is too easy to hit by accident. Add in a "Are you sure you want to quit?" with it for confirmation on a Shortcut.
If it's supposed to be taking a screenshot, then the game is bugged for me. I don't get any type of error though, I assumed it was a game quit.

Take a peek in your SK installation folder. If there is a log file that looks like "hs_err_pid" with a number string with a creation date at the same time as when the client closes then it's likely Java is going screwy on you. And if you have the know-how it tells you exactly what went wrong (no I do not have the know-how).
I would have taken a look at it if I had one, but alas I don't. Not sure why it's crashing the game without an error.
F12 saves a screenshot to your desktop... that's an interesting crash if it closes the game for you every time.