SDL2: Keyboard fixes

This should fix all (known) keyboard issues with the SDL2 branch.