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
[BUG] The compose support works only for sequences starting with Multi_key or dead_ keys, it ignores lines starting with other keys #379
Comments
Peek.2022-09-07.17-08.mp4 |
However, when the same test is done in an xterm started like
This test fails, one gets only U+FEFB: Peek.2022-09-07.17-11.mp4 |
I.e. even though ibus has compose support, the compose support in ibus apparently does not support the lines
|
The Compose support in Gtk3 and Gtk4 does not support this either. If I have a `~/.XCompose file containing:
and then test the Gtk3 Compose support in
and the Gtk4 Compose support in
and type the So it looks like the Compose support in Gtk3/Gtk4 does not support this either. |
Another compose implementation is in ibus-typing-booster and this does not support this either (that’s why I opened this issue here). In case of ibus-typing-booster, I can obviously see why: https://github.com/mike-fabian/ibus-typing-booster/blob/main/engine/hunspell_table.py#L5533 return False
if (not self._typed_compose_sequence
and not key.name == 'Multi_key'
and not key.name.startswith('dead_')):
if DEBUG_LEVEL > 1:
LOGGER.debug('Not in a compose sequence.')
return False i.e. ibus-typing-booster currently considers everything which does not start with |
I will try to fix this in typing booster, but that will only make the Arabic xkb keyboard work correctly in typing-booster of course. To make it work correctly elsewhere, the Compose support in ibus and in Gtk3/Gtk4 need to be fixed as well. |
This commit in libX11 from 2008-06-20 added the Arabic compose sequences: https://gitlab.freedesktop.org/xorg/lib/libx11/-/commit/21e464ec682ab23ba20ddf6bd72c6db214cfbe01
|
Here is the original bug to add these Arabic compose sequences: https://bugs.freedesktop.org/show_bug.cgi?id=16426
|
Original discussion about the problem: |
The test builds of ibus-typing-booster >= 2.18.17 at This video shows that it works for the special Arabic compose sequence:
Peek.2022-09-09.10-08.mp4 |
Discovered while reasearching https://bugzilla.redhat.com/show_bug.cgi?id=2122899
On the AB05 key (that is where the
b
is on an English US layout, the standard Arabic xkb layout produces U+FEFB:That is not desired, the desired result is U+0644 U+0627
But with xkb layouts, it is not possible to output more than one keysym per keystroke.
https://www.freedesktop.org/wiki/Software/XKeyboardConfig/XKB2Dreams/ talks about
`3. Support for scenarios "multiple keypresses - one keysym" and "single keypress - multiple keysyms".
If xkb would be improved like this, one could output U0644 U0627 when pressing the AB05 key.
But that is a “dream” and might never happen.
So I suggested to the user to use ibus-m17n or ibus-typing-booster with ar-kbd.mim instead, ar-kbd.mim emulates the Arabic keyboard on top of an US English keyboard layout using m17n-lib and can output any string for any keypress. It outputs the desired U+0644 U+0627 when typing
b
.But the user had also noticed that it just happens to work in Qt apps, I could not figure out why, it appeared very mysterious to me.
Today, after more discussion with the user avidseeker we finally stumbled on the reason.
It is because of Compose support!
So even though the xkb keyboard for Arabic produces U+FEFB, the Compose support then replaces this by U+0644 U+0627.
That can be tested by starting xterm like this:
This makes sure that the Compose support of X11 is used and not the Compose support of ibus
Then in the xterm, type
and we see that the b produces U+0062, which is correct.
Switch to the Arabic keyboard,
type “arrow up” to get the
echo -n b | iconv -f utf8 -t utf16le | od -x
line back, go back to theb
with “arrow left”, typeb
and now one gets:I.e. even though the keyboard surely outputs only U+FEFB, the Compose support of Xorg transforms this into U+0644 U+0627
The text was updated successfully, but these errors were encountered: