Improve keyinput on non us layouts #3001
Open
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.
Improves keymapping for non english keyboard layouts (#2731)
On non english keyboard layouts the logical_key and the physical_key of the KeyEvent may differ e.g.
which is mapped to a KeyPress struct with values
This PR uses the value of the logical_key to get a KeyInput with a matching Keycode which leads to
a KeyPress with matching Character and Code:
or
This fixes many keybindings like Ctrl+Z (#2775).
Unfortunately not all keybindings are fixed. For example Ctrl+= is still not working.
On a german keyboard the equal sign "=" is reached by pressing Shift+0.
The KeyEvent for this case will be Ctrl+Shift+= which obiously doesn't match the keybind Ctrl+=.