[v2.0 samples] SDL "keycodes" with "scancodes" #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In SDL2, Scancodes were introduced. This keyboard representation does not move around with the keyboard layout and makes everything consistant.
When you use a non-qwerty keyboard, the alpha keys tend to be moved around. Scancodes makes so that, for example, the WASD keys will allways be placed at the right place.
This is a non issue on Windows as it always behaved that way, but on linux, Keycodes respect the current keyboard layout, so international users will have the samples running with the wrong keyboard mapping.
All of the alphabetical keys in the samples source code have been changed to scancodes. I did not change all the function key and other special characters as this will not change anything for theses keys and I wanted to keep the diff short.