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

Add iteration API for compose #366

Closed
legionus opened this issue Jul 24, 2023 · 3 comments · Fixed by #367
Closed

Add iteration API for compose #366

legionus opened this issue Jul 24, 2023 · 3 comments · Fixed by #367
Labels
compose Indicates a need for improvements or additions to Compose handling enhancement Indicates new feature requests

Comments

@legionus
Copy link

Hi! I'm a kbd project maintainer. I want to add xkbcommon support and generate kernel keymaps on fly. I made a proof-of-concept[1] a while back and it works quite well, but I ran into a problem with libxkbcommon. There is no way in the libxkbcommon to walkthrough a xkb_compose_table. I need this to load the compose table into the kernel (it's Just the sequences and the results). The Kernel API allows data to be loaded into kernelspace and then handles the input with everything itself.

In early 2022 I emailed Ran Benita about this issue and he even did an implementation [2], but unfortunately did not complete it.

Can you make something like xkb_keymap_key_for_each but for xkb_compose_table or maybe some other way to examine the table ?

[1] legionus/kbd#72
[2] master...bluetech:libxkbcommon:compose-traverse

@wismill
Copy link
Member

wismill commented Jul 24, 2023

That’s a good idea. I started to have a look at this in the context of #361, but I did not know about Ran’s work, as there is no corresponding PR.

@wismill wismill added compose Indicates a need for improvements or additions to Compose handling enhancement Indicates new feature requests labels Jul 24, 2023
@wismill
Copy link
Member

wismill commented Sep 26, 2023

@legionus The new API will be part of the 1.6.0 release.

@legionus
Copy link
Author

legionus commented Oct 2, 2023

@wismill Thank you! I've spent some time with the implementation from master and it works for me so far.

Now my problem is that almost all locales are mapped to en_US.UTF-8/Compose (even in your tests), and there are ~5000 entries. Thus, in essence, there is no division by languages on UTF-8. But this is no longer a libxkbcommon problem, but mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compose Indicates a need for improvements or additions to Compose handling enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants