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

Fix parsing issue in hyprland language module with layouts containing commas #3700

Closed
wants to merge 1 commit into from

Conversation

rom4kov
Copy link

@rom4kov rom4kov commented Oct 20, 2024

Problem: Since version 10.4, the hyprland language module had an issue with parsing keyboard layout names that contain commas. For example, the layout "English (intl., with AltGr dead keys)" would not be parsed correctly when switching layouts.

Issue: The IPC event string for a layout like "English (intl., with AltGr dead keys)" received in the onEvent function contains two commas—one separating the keyboard name from the layout name and another within the layout name. However, the function currently splits the string after the last comma, which leads to incorrect parsing.

Solution: This pull request modifies the onEvent function to split the event string at the first comma instead of the last one, allowing for accurate parsing of both the keyboard name and layout name.

@rom4kov
Copy link
Author

rom4kov commented Oct 20, 2024

Hi! I apologize for not checking the existing discussions and the recent pull request #3406 related to the parsing issue with keyboard layout names. I see that there are concerns about the approach I took, particularly with handling embedded commas in both the keyboard name and layout name. Just changing from splitting on the last comma to splitting on the first comma is my solution proposes would not solve the issue for user's with layouts that have commas inside the keyboard name for example. Therefore I'm closing this PR.

@rom4kov rom4kov closed this Oct 20, 2024
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.

1 participant