Don't set modifiers for AltGr on Windows #674
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.
AltGr is the same as ctrl+alt, and we don't want those to be set when you press a key using AltGr.
This fixes jesseduffield/lazygit#2839; there, we register keybindings for
[
and]
without modifiers, but they can't be used with a German keyboard layout, where[
is typed using AltGr+8. The code that dispatches the keybindings checks that the modifiers are the same; it expects none, but sees ctrl and alt.Yes, this means it's not possible to register a keybinding for ctrl+[ and have it work for non-US keyboards. But that's no different from, say,
!
on a US keyboard; you can't have a keybinding for shift+! either. (And you don't want to have shift reported as a modifier when typing!
.)