Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set modifiers for AltGr on Windows #674

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

stefanhaller
Copy link

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 !.)

AltGr is the same as ctrl+alt, and we don't want those to be set when you press
a key using AltGr.
Copy link
Owner

@gdamore gdamore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How bizarre. (I mean that Windows reports this as AltGr.)

@gdamore gdamore merged commit 96e2990 into gdamore:main Jan 3, 2024
@stefanhaller stefanhaller deleted the fix-AltGr-characters-on-Windows branch January 3, 2024 19:00
stefanhaller added a commit to jesseduffield/gocui that referenced this pull request Jan 3, 2024
…dule

The official upstream now contains all the changes we need, plus a new one that
my fork doesn't have (gdamore/tcell#674). This is
basically a revert of 5dd3e67 and c670e30, just with updated dependencies.

Bumping to @main because there's no tag yet at the latest change we need.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change Tabs does not work - also when changing the keybindung
2 participants