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

Enable out-of-range group action configuration using keymap flags (take 2) #507

Closed

Conversation

wismill
Copy link
Member

@wismill wismill commented Sep 17, 2024

In #487 I added keymap compile flags to configure the out-of-range group action, but it should be separate PR.

Note that I proposed #488 previously but @bluetech advised to keep xkb_keymap “immutable”.

@wismill wismill added enhancement Indicates new feature requests compile-keymap Indicates a need for improvements or additions to keymap compilation state Indicates a need for improvements or additions to the xkb_state API labels Sep 17, 2024
@wismill wismill added this to the 1.8.0 milestone Sep 17, 2024
@wismill wismill force-pushed the keymap/out-of-range-group-action2 branch 3 times, most recently from dab9612 to 16e9649 Compare September 18, 2024 06:34
@wismill wismill marked this pull request as ready for review September 18, 2024 06:38
@wismill wismill added the X11 legacy: missing feature Indicates a need to implement legacy X11 features label Sep 18, 2024
@wismill
Copy link
Member Author

wismill commented Sep 20, 2024

Missing: get and use the corresponding control value from X11 for libxbbcommon-x11.

Introduce 2 new keymap compilation flags to configure the action:
- `XKB_KEYMAP_REDIRECT_OUT_OF_RANGE_LAYOUT` to use “redirect into range”.
- `XKB_KEYMAP_CLAMP_OUT_OF_RANGE_LAYOUT` to use “clamp into range”.

The default action remains “wrap into range” using integer modulus.
@wismill wismill force-pushed the keymap/out-of-range-group-action2 branch from 16e9649 to f7563b6 Compare September 27, 2024 12:02
@wismill
Copy link
Member Author

wismill commented Sep 27, 2024

The issue with the current implementation is that we are using flag positions to encode the target layout number, but with #515 coming this will not scale. We could keep the flag, but add a new function to change the target layout (default: 0).

A use case for having target layout different of 0 is tweaking the shortcuts (Ctrl, Alt, etc.) to change the group, in order to make e.g. non Latin layout work without relying on the toolkit to look for Latin letter in other layouts. This would most likely require #487.

@wismill wismill changed the title Enable out-of-range group action configuration using keymap flags Enable out-of-range group action configuration using keymap flags (take 2) Sep 28, 2024
@wismill
Copy link
Member Author

wismill commented Sep 28, 2024

Closing in favor of #516.

@wismill wismill closed this Sep 28, 2024
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 enhancement Indicates new feature requests state Indicates a need for improvements or additions to the xkb_state API X11 legacy: missing feature Indicates a need to implement legacy X11 features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant