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

Manage AltGr on Windows #937

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Geobert
Copy link

@Geobert Geobert commented Oct 27, 2024

Fixes #820

Tested with local build of Yazi and Broot

@Geobert Geobert requested a review from TimonPost as a code owner October 27, 2024 11:35
@fnuttens
Copy link

Tested with local build of Helix, this solves related issues (helix-editor/helix#5718 and helix-editor/helix#7129) 🎉

Thank you so much for your work @Geobert!

Copy link
Member

@TimonPost TimonPost left a comment

Choose a reason for hiding this comment

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

Do you have a link to some documentation that this is the correct way to check if altgr is pressed? Like some resource from Microsoft, since I have difficulties looking up the spec for this and no keyboard to try on.

@Geobert
Copy link
Author

Geobert commented Nov 17, 2024

Do you have a link to some documentation that this is the correct way to check if altgr is pressed? Like some resource from Microsoft, since I have difficulties looking up the spec for this and no keyboard to try on.

Hi, thanks for looking at this.

I don’t have such spec unfortunately, but this is from one of MS team https://github.com/microsoft/Terminal/blob/660d31ac522186e615ec243de2a434c273464828/src/terminal/input/terminalInput.cpp#L400-L419

and other sources quoted in the issue have similar code to manage AltGr :)

Let me know if you need more :)

@joshka
Copy link
Collaborator

joshka commented Nov 18, 2024

This is also related to #917 and comments in #685 (comment)

@joshka
Copy link
Collaborator

joshka commented Nov 18, 2024

Is this the wrong thing to do for non-AltGr enabled keyboards? Will this swallow the specific combination of Alt+Ctrl keys?

@Geobert
Copy link
Author

Geobert commented Nov 24, 2024

It might for combinations using Right alt+Ctrl keys I guess

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.

AltGr keys produce alt and ctrl modifier on windows
4 participants