Fix input in configuration tool (SDL2) #4629
Merged
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.
While you can edit your settings using Configuration Tool, the characters you see when you type with Shift-key was messy.
This is due to that SDL2 provides correct keycode if Shift-key is NOT pressed, but provide incorrect keycode if Shift is pressed.
As a result, you find some keys not possible to type with a non-US keyboard.
This PR will make all keys act as US keyboards for the time being so that at least you can type all common symbols.
We can further fix this if we can find out a way that SDL2 will provide the keycode when Shift-key is pressed.
Also, keypad keys were not working, so made it work.
Test result on JP keyboard
Before fix
Shift+1,2,3 is !@#, as same as US keyboard.
Shift+P,@,[ is P@{ which is not correct. (Shift+@ is not @)
After fix
P,@,[ on JP keyboard is P,[,]
Shift+ P,@,[ is P,{, }