--- Begin Message ---
Subject: |
Re: Outputting NFC with ibus-m17n |
Date: |
Tue, 25 Jun 2024 12:04:27 +0200 |
Richard Wordingham <richard.wordingham@ntlworld.com> さんはかきました:
> On Thu, 20 Jun 2024 10:54:57 +0200
> Mike FABIAN <mfabian@redhat.com> wrote:
>
>> Richard Wordingham <richard.wordingham@ntlworld.com> さんはかきました:
>>
>> > I have a couple of problems using m17n with ibus on Ubuntu.
>> >
>> > ibus 1.5.26-4
>> > ibus-m17n 1.4.9-1
>> > m17n-db 1.8.0-3
>> >
>> > The core of the keyboard definition is a set of keystroke
>> > definitions such as
>> >
>> > (map
>> > (simple
>> > ;; cy3sn-p1:
>> > ("B" ?β) ; U+03b2 GREEK SMALL LETTER BETA
>> > ...
>> > ("e_H" ?é) ; U+00E9 LATIN SMALL LETTER E WITH ACUTE
>> > ))
>> > (state (init (simple)))
>> >
>> > These problems didn't occur when I was using fcitx as the input
>> > method.
>> >
>> > The first problem is that when the sequence of keystrokes is an
>> > initial portion of another sequence of keystrokes, the character I
>> > thought I had entered simply disappears after a while if I don't
>> > firm it up by moving to another character, e.g. by entering more
>> > strokes or moving the cursor.
>>
>> Can you ɡive an example?
>
> For example, if I hit shift-B three times into a Gnome-terminal and
> then go away for a while, there are three betas when I get up but
> only two when I come back. The wait varies a lot. It can be as little
> as 20s, but can be several minutesǃ
>
> Part of the cause of the problem is that I also have:
>
> ("B\\" ?ʙ) ; U+0299 LATIN LETTER SMALL CAPITAL B
> ("B\\\\" ?B)
>
> Therefore the entry has not been finalised because I have not entered
> a backslash, and it seems that unfinalised entries get deleted after a
> timeout. This is extremely annoying when copy-editing diacritic-rich
> text. At least one can often notice base characters disappearing
> before one's eyes. Can a user or keyboard definition set the timeout to
> something more reasonable, like a week?
I cannot reproduce this, I think there is no specific timeout.
For me the preedit stays forever. The preedit is committed when
- you type the next Shift-B
- you type something else which causes a commit like a space
- the window loses focus (maybe you are using focus-follow-mouse and the mouse
pointer drifts out of
the window after some time?)
- the cursor is used to another position in the current window with a
- mouse click
To make it easier to see a distinction between what is in preedit and
what is already committed I recommend to use the ibus-m17n setup tool to
set an underline and/or colours for the preedit.
In this screenshot I used colours and an underline:
Screenshot.png
Description: PNG image
You see the last beta coloured and underlined.
If I click on a different window or somewhere into that window, the last
beta becames black without underline, it gets "committed", and I have 3
betas.
That is different from what you see, because in your case the preedit
(the last beta) seems to disappear. Whether the preedit is discarded or
committed on a focus change can be decided by the input method.
ibus-m17n changed to committing it always a long time ago, so unless
you are using a really ancient version of ibus-m17n, it suprises me that
the preedit is discarded.
> I have put my keyboard definition on the internet as
> https://wrdingham.co.uk/fonts/xsampa.mim.zip. (Zipped because it's
> UTF-8, not Latin-1.) Its comments haven't been fully converted from
> Quail to m17n - I want the _source_ code to be the same for the Quail and m17n
> versions.
Thank you!
A bit more about the NFD/NFC problem (which you said is solved for you):
ibus-m17n produces NFD or NFC output depending on what the m17n-db .mim
file does, ibus-m17n does not change that. But maybe it should?
committing NFD is normally not useful, so it might be better if
ibus-m17n converted all commits automatically to NFC?
ibus-typing-booster for example does that.
You can also use your xsampa.mim with ibus-typing-booster. You could
check whether that works better for you.
Documentation for ibus-typing-booster is here:
https://mike-fabian.github.io/ibus-typing-booster/docs/user/
See especially the "Basic setup for your language" chapter:
https://mike-fabian.github.io/ibus-typing-booster/docs/user/#2_1
ibus-typing-booster always converts commits to NFC, **but** while doing
some testing with my own sampa input method
https://github.com/mike-fabian/m17n-db-ipa-x-sampa/blob/main/ipa-x-sampa.mim
which also produces sometimes NFD, I found this bug in typing booster
https://github.com/mike-fabian/ibus-typing-booster/issues/515
which I fixed yesterday. It did correctly convert the commit to NFC but
then mistakenly tried to correct the cursor one position to the
left. That bug could only occur with input methods which produced NFD.
--
Mike FABIAN <mfabian@redhat.com>
睡眠不足はいい仕事の敵だ。
--- End Message ---