Skip to content

symbols: Allow levels with different keysyms and actions counts #620

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

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

wismill
Copy link
Member

@wismill wismill commented Jan 27, 2025

Contrary to groups, there is no reason for levels to restrict the same count of keysyms and actions. See the related discussion with @mahkoh.

This will allow better support for the use case Modifier + Group change, since we only want to communicate the modifier keysym to app, not the group keysym.

Also always normalize the multi-keysyms/actions lists by dropping NoSymbol and NoAction.

Fixes #619

TODO:

  • Modify xkbcomp so that it ignores multi-actions per level, as it already ignores multi-keysyms.

@wismill wismill added the compile-keymap Indicates a need for improvements or additions to keymap compilation label Jan 27, 2025
@wismill wismill added this to the 1.8.0 milestone Jan 27, 2025
@wismill wismill requested review from bluetech and whot January 27, 2025 16:42
@Jules-Bertholet
Copy link
Contributor

Do we really want to drop NoAction()? It’s really somewhat of a misnomer, as it does perform an action—breaking latches.

@wismill
Copy link
Member Author

wismill commented Jan 28, 2025

@Jules-Bertholet I though about introducing VoidAction(), to mirror NoSymbol/VoidSymbol. Because currently we also do not have an easy way to erase previous explicit actions when using RMLVO:

  • NoAction() does not overwrite the previous action.
  • replace key works only in the same file or after a child file.
  • SetControls() kind of work if you want to break latches. But it’s ugly.

The no/void qualifiers are not very clear, but at least we would be consistent with the keysyms.

Contrary to groups, there is no reason for levels to restrict the same
count of keysyms and actions.
@wismill wismill force-pushed the actions/independent-level-count branch from b6354ca to 175324c Compare January 29, 2025 05:36
@wismill wismill merged commit c85c9bd into xkbcommon:master Jan 29, 2025
5 checks passed
@wismill wismill deleted the actions/independent-level-count branch January 29, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile-keymap Indicates a need for improvements or additions to keymap compilation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop NoSymbol in multi-keysym lists and NoAction() for multi-action lists
2 participants