Handle keypresses in more detail.

This makes shift+arrows work. And this commit requires dfhack plugin update.