-
Notifications
You must be signed in to change notification settings - Fork 125
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
RMLVO: support for applying option on specific layout index #500
Comments
Or make this a proper builder API so we don't have to worry about magic syntax. Something like: rmlvo = xkb_rmlvo_new();
layout = xkb_rmlvo_layout_new("us");
xkb_rmlvo_layout_set_variant(layout, "dvorak");
xkb_rmlvo_layout_add_option("banana");
xkb_rmlvo_layout_add_option("orange");
xkb_rmlvo_add_layout(layout);
// repeat for layout 2 if need be
keymap = xkb_keymamp_new_from_rmlvo(context, rmlvo, flags); or, for those who really like varargs: layout = xkb_rmlvo_layout_new("us",
XBK_RMLVO_VARIANT, "dvorak",
XKB_RMLVO_OPTION, "banana",
XKB_RMLVO_OPTION, "banana",
XKB_RMLVO_END); sd-bus uses the latter extensively but in your case I think the first approach is better. No backwards compat issue either since it's a new API :) |
I like this idea (without varargs)! But the new suffix syntax would still be useful for CLI, wouldn't it? We need to figure out how to handle this in |
Might be better to dream up a new syntax. after all the xkbcommon cli isn't quite as wide-spread through config files everywhere as e.g. setxkbmap's. A rather lame but easyn enough approach would be:
Since we only have 4 groups that's not impossible to implement. |
We really need to add short CLI arguments 😅. And we need to keep #37 in mind. |
heh, sort-of but I usually get angry when I see scripts using short args, forcing me to decypher what And even if we want more than 4 groups/layouts, well, we're not going to run out of numbers, so |
Then we would need to change the args-parsing function or use a macro, because this will not scale. Maybe add only a
|
what I don't like about I'd have to look it up but there's a way you can expand a macro into more things so we can have a |
I think that supporting this feature properly would require to add support in rules files for However, since
But wait, it does not make sense for some options to be applied on specific layout indexes (e.g. types, compat, option that modify modifiers mappings). So we would also need to communicate this via the XML registry file. |
See the corresponding
xkeyboard-config
issue.The idea would be to be able to have a suffix per option, such as it applies only to some layout indexes.
Some preliminary ideas:
,
cannot be used as a suffix delimeter, as it is the option separator.:
should not be used as a suffix delimeter, e.g.eurosign:e:2
, because it is ambiguous.@
seems an interesting candidate; it clashes with nothing currently. E.g.:eurosign:e@2
@all
,@first
, etc. as well.The text was updated successfully, but these errors were encountered: