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

Support XK_ISO_Level3_Shift and XK_ISO_Level5_Shift #19


Copy link

@MaxGyver83 MaxGyver83 commented May 24, 2020

This PR adds support for XK_ISO_Level3_Shift and XK_ISO_Level5_Shift.

The AltGr key is mapped to XK_ISO_Level3_Shift in the default German keyboard layout (and others). The Neo keyboard layout (which is like a German Dvorak) and other layouts derived from it additionally use XK_ISO_Level5_Shift. Adding these might make it possible to fix some keyboard layout related bugs in VS Code, p.e. microsoft/vscode#24043, microsoft/vscode#23991 (at least for Linux).

The property withAltGr now depends on kLevel3KeyModifierMask (instead of kControlKeyModifierMask | kAltKeyModifierMask). This works for both the default German keyboard layout as well as for the Neo layout. Without this PR it doesn't work for Neo (see microsoft/vscode#24043 (comment)).

This PR also considers level 5 in the output. This is only important for layouts that use XK_ISO_Level5_Shift, like Neo.

I have added withLevel3Level5 as sixth property (instead of the expected withShiftLevel5) because the latter seems to have no relevance but the former corresponds layer 6 in the Neo keyboard layout.

Property Layer in Neo
value 1
withShift 2
withAltGr 3
withShiftAltGr 5
withLevel5 4
withLevel3Level5 6

Copy link

msftclas commented May 24, 2020

CLA assistant check
All CLA requirements met.

Copy link
Contributor Author

I don't have a reviewer. @alexdima : What do you think about this PR?

Copy link
Contributor Author

Is anybody there?

Copy link

alexdima commented Aug 7, 2020

This looks very good! Thank you! ❤️

@alexdima alexdima merged commit ef153d2 into microsoft:master Aug 7, 2020
Copy link
Contributor Author

Thank you for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants