-
Notifications
You must be signed in to change notification settings - Fork 124
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
Modern Composition #426
Comments
A fairly high-level question: at what point does compose become an input method? And would a more complex compose be better left to an input method implementation (e.g. ibus)? AFAICT XKB compose sequences pretty much pre-date input methods because back in the early 1990s there was little consideration of CJK languages (and others that need IM). But modern desktops enable IM by default, e.g. I always get annoyed when I have a new GNOME session and my shortcuts produce emojis instead. So, without going into technical details I would probably argue that putting compose into IM implementations might be a more scalable approach? |
It is indeed an input method (see definition on Wikipedia). Maybe the oldest one?
In fact it is already implemented as an input method in Gtk and Qt. But while Qt uses xkbcommon implementation underneath, Gtk decided to go its own way in ibus. I am not sure why they took this decision and if this is a definitive one. Could it be that compose support in ibus predates compose support in xkbcommon?
I really dislike ibus. I use the Plasma desktop and it does not integrate well. It is really Gnome-focused. Not mentioning that it is not efficient (cpu, memory). But I admit it does a few things better: support for overlapping Compose sequences (see #398 to implement this in xkbcommon and in Qt) and support of
I wish we could have a reference implementation of Compose machinery for all input methods frameworks. I think my proposal is not disruptive (apart the new text format): Compose feature is by essence a state machine; I would like to lift some of its current limitations. I see the following next steps:
|
yep, GTK compose handling pre-dates libxkbcommon by... quite a number of years :)
AIUI libxkbcommon is on github because at the time it was the only git forge (freedesktop was still on bugzilla + ssh-git). xkbcommon is also severely lacking developer time, so it may be better hosting this "closer" to the users to take advantage of the user set (or even freedesktop gitlab). But otherwise I don't see a reason why not to host this in this namespace. |
@whot Has anyone proposed a unified implementation (parsing, state handling)? I could not find evidence after a quick check. Any advice how to start the discussion with Gtk devs? |
Note that I know of but let's see if @ebassi is listening (and can answer the second question) :) |
Input methods are an area of computing and UX where people have Strong Opinions™, especially when it comes to workflow issues; for instance, you'll often hear something to the effect of "I really dislike [project]", for one reason or another.
It's actually the other way around: about 12 years ago, GNOME picked a single input method framework for a variety of reasons, and then designed the whole thing around it, instead of just letting people choose and avoiding to commit to a specific UX. Of course, it's not without strife: ibus has its own shortcomings, mainly at the intersection of deeply entrenched workflows (see above, re: xkcd) and UI design.
Not that I know of. GTK has its own |
As a side note: GTK isn't going to drop parsing the existing XCompose files, but we're not going to add a new compose file format, especially one using YAML. If a new format is defined, support for it will have to be implemented inside ibus or inside a separate, out of tree input method module for GTK. |
@ebassi thank you, this is insightful!
Sorry about that. It was not constructive.
So the conclusion is probably: “if it is not broken, do not fix it”. Fair enough, let’s keep multiple implementations.
What is the issue with YAML in this case? I would not mind to use another format. Have you another format in mind?
So the only way to enhance Compose seems to develop a dedicated library for the new format, then build an engine for both Qt IM and iBus? |
The issue with YAML is that we don't have a parser for it, and adding libyaml as a dependency to GTK is not going to happen. For out of tree input methods we don't have the same restrictions, of course.
That would be my recommendation. |
For the record: Gtk ticket “Use xkbcommon-compose instead of custom compose table mechanism”. |
Modern Composition
NOTE: This document is a draft.
Introduction
The current power of Compose sequences is great but looks limited compared to macOS.
macOS uses a state machine, which is quite powerful. In fact, the current implementation of Compose in
xkbcommon
also uses a state machine internally, but we do not use its full power.I propose we change that and create a new format in order to:
Proposed changes
XKB_COMPOSE_FILE
to detect what Compose file to load. This way we can keep compatibility with X11 and itsXCOMPOSEFILE
variable.XKB_COMPOSE_FILE
has precedence overXCOMPOSEFILE
.New Compose file format
The new Compose file format is based on a restricted set of features of YAML 1.2.
Documented example:
Partially converted
en_US.UTF8/Compose
:X11 data
We could reuse the new format for compose files templates in the
libX11
repository:The text was updated successfully, but these errors were encountered: