Re: Adding context to GtkIMContextIM
- From: Mark Leisher <mleisher crl nmsu edu>
- To: gtk-i18n-list gnome org
- Subject: Re: Adding context to GtkIMContextIM
- Date: Wed, 24 Oct 2001 11:03:57 -0600 (MDT)
Theppitak> The input method must ensure that the input text is in
Theppitak> cannonical form. A basic XIM just filters out key events that
Theppitak> would create a non-cannonical form, without touching the text
Theppitak> buffer.
Theppitak> A sophisticated XIM tries to "normalize" the order by editing
Theppitak> the previous cell and managing the input char to be placed
Theppitak> eventually.
Theppitak> The cannonical order for a cell is BV?T?, where B is a base
Theppitak> char, V is an above/below vowel/diacritic, and T is a top tone
Theppitak> mark/diacritic.
Little details like reodering vowel and tone marks are things that make an
input method nice.
At the risk of sounding like a broken record, again, this sort of thing is
trivial using the MIM package I put together:
http://crl.nmsu.edu/~mleisher/mim/mim-1.0.tar.gz
You can see it in action as part of a Java Applet at:
http://crl.nmsu.edu/~mleisher/jmutt
Choose the Thai->Thai Context Demo input method and type "-h7". The vowel
and tone marks are reordered. Here are the relevant lines in the input
method:
bind "h" send 0x0E49 keycap 0x0E49
bind "h7" backspace send 0x0E360x0E49
NOTE: Since moving the applet to all Swing instead of all AWT, we've been
having lots of problems with many different browsers. We may be going
back to AWT.
Ignore the stuff on the next page to avoid yet more ranting about input
methods in X11.
What is MIM?
I got tired of the unecessary, bloated, over-complicated input method
approaches that are creeping into X11. MIM proves input support for most
scripts can be done in less than 100Mb (slight exaggeration). Compiled with
-g, the MIM code is 86K, compiled with -O4, it is 22K.
Yes, it has to be included in each program at the moment, but an astute
observer will notice that making a single IM server out of it would not take
much effort.
Yes, it does not support Chinese or Japanese input yet (except for TCode
Japanese). I just haven't had time to do it yet. Maybe someone else will
recognize that it isn't hard to integrate support for [tck]Wnn/Canna/Sj3. Or
maybe there is a better way to do it.
-----------------------------------------------------------------------------
Mark Leisher Rights surrendered are not easily
Computing Research Lab regained, and a police state is not
New Mexico State University worth defending.
Box 30001, Dept. 3CRL -- Patrick O'Grady
Las Cruces, NM 88003
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]