-
Notifications
You must be signed in to change notification settings - Fork 39
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
Terminating with std::out_of_range #1
Comments
Thanks a lot. I should have checked that. I've reverted 42abcc0 and applied simpler fix of the original problem. |
Hello, your fix is actually a bit wrong. It gets rid of the error, but skips flavoured layouts. |
Hi. Thanks for the report. Looks like I didn't understand the problem: my idea was to exclude all tokens with '(' ')' from the final list, because I thought they don't name layouts. Unfortunately, this is not true. Do you know some spec or manual describing the format of layout string? I'll add the option allowing users to view debug info. |
Honestly no idea :-) I haven't played in this area at all. From a short look-around the format looks pretty simple, apparently a little program called xkblayout-state from AUR gets it right. It uses numbers to set active layout instead of layout symbols. This might actually be a smart way. For testing I've just included a new layout to my list, it's US but with "alternative international" flavour. Now my symbols string is 'pc+us+sk(qwerty):2+at:3+us(alt-intl):4+inet(evdev)+compose(ralt)' and "xkb-switch -l" gives "us sk at us" - so the question is when I now call "xkb-switch -s us", which one do I actually mean? I've tried it and it always sets the first layout with given symbol name, which is not an ideal solution if you actually need more layouts of the same language. Perhaps it might be useful to add another parameter, or at least a possibility to call "xkb-switch -s <lang>(<flavour>)" or something like that :-) so if you call it without specific flavour, it chooses the first matching layout, but it would also be possible to select different layouts of the same language. |
I've implemented lang(flavour) idea. Actually, '(flavour)' is now just a part of layout name. Please let me know if it doesn't work. |
Note also --test option ;) |
Works for me now, thanks :-) I had to modify key association for sk to sk(qwerty), other than that no problems. |
Fox xkb_symbols string like
pc+us+ru(winkeys):2+ua(winkeys):3+inet(evdev)+group(toggle)
running with non-first group active produces error
It seems that symbols followed by '(' should not be ignored unconditionally like they do since 42abcc0.
The text was updated successfully, but these errors were encountered: