EngoEngine / engo

Engo is an open-source 2D game engine written in Go.
https://engoengine.github.io
MIT License
1.74k stars 136 forks source link

SDL uses characters instead of keys #696

Open Noofbiz opened 4 years ago

Noofbiz commented 4 years ago

currently, SDL builds poll the keyboard keys and return the character the key returns. This works if the game is developed on the same keyboard layout, usually qwerty, as the players. But if the players have a different layout, then the keys will end up all over the place. To fix this, in glfw we do keys based on the qwerty keyboard location, so KeyQ represents the top left-most keyboard key, no matter what the layout actually is. We should do this in SDL as well.