Re: Input methods
- From: Simos Xenitellis <simos74 gmx net>
- To: Joachim Noreiko <jnoreiko yahoo com>
- Cc: gtk-devel-list gnome org, Owen Taylor <otaylor fishsoup net>, GNOME Documentation <gnome-doc-list gnome org>
- Subject: Re: Input methods
- Date: Thu, 23 Mar 2006 20:51:18 +0000
On Thu, 2006-03-23 at 18:09 +0000, Joachim Noreiko wrote:
> --- Simos Xenitellis <simos74 gmx net> wrote:
>
> > On Thu, 2006-03-23 at 16:46 +0000, Joachim Noreiko
> > wrote:
> > > --- Owen Taylor <otaylor fishsoup net> wrote:
> > >
> > > > I'm sorry, I have don't time to help; I think
> > > > Matthias answered you on one
> > > > of the lists
> > > > with the correct answer, which is that we don't
> > see
> > > > that menu with the input
> > > > methods appearing in a typically configured
> > desktop;
> > > > instead input method
> > > > switching will be done system wide using a
> > system
> > > > such as SCIM or IIIMF.
> > >
> > > I don't understand most of what you've said.
> > > On Ubuntu Breezy, and on a virtual machine of
> > stock
> > > GNOME 2.13.something, the Input Methods appears in
> > the
> > > context menu of all text widgets.
> > > It has a list of items as I've detailed.
> > > These need to be documented.
> > > If nobody can satisfactorily explain what these
> > are
> > > and how they work, may I request that they be
> > removed
> > > from GNOME?
> >
> > The context menu entries you see in each textbox
> > come from
> > /etc/gtk-2.0/gtk.immodules
> > which leads to
> > /usr/lib/gtk-2.0/2.4.0/immodules
> > (That's Ubuntu 5.10, your mileage may vary).
> >
> > When SCIM or IIIMF (or other) are installed, they
> > place an IM module
> > in the above file and the above directory. This way,
> > you are able to
> > choose between one or another, on an on-demand case.
> >
> > You may preselect for your entire session which one
> > of these to be
> > active by setting the variable
> > GTK_IM_MODULE.
> > For example, you will notice the file "im-iiim.so"
> > in the directory
> > above, for IIIMF. To preselect this,
> > setenv GTK_IM_MODULE iiim (ok, am into tcsh :-)
> > which is the part between "im-" and ".so" from the
> > module name.
> >
> > The default Input Module is "Default", that is, GTK+
> > handles the input
> > method. Why would GTK+ bother here and not let X.org
> > do all the work?
> > Because it does not only run on Linux; it works on
> > other systems as
> > well. Part of this situation is that GTK+ duplicates
> > the compose
> > sequences table from X.org to enable to type
> > characters with accents
> > (either MULTI_KEY or dead keys).
> > This works ok for most languages now, though there
> > is some work to synch
> > the table from upstream
> > http://bugzilla.gnome.org/show_bug.cgi?id=321896
> >
> > If you want a GTK+ application to bypass any GTK+
> > Input methods and work
> > directly with X.org, you choose "X Input Method", or
> > "xim".
> >
> > Now, for some other languages, the X.org keyboard
> > component is not able
> > to work with some languages, such as Ethiopic, as
> > there are too many
> > characters. For these, special modules in GTK+ have
> > been written, such
> > as the Amharic one. It might be possible to get SCIM
> > do this work; I
> > have no clue if it is possible or doable. In Ubuntu,
> > when you install
> > the Amharic locale and writing support, you can
> > actually write Amharic,
> > and most probably this comes from the Amharic GTK+
> > Input module (I
> > cannot think of any other way...).
> >
> > Some of the entries here could simply get removed,
> > such as Thai (it says
> > Broken), however, I do not feel that it makes sense
> > to remove the whole
> > menu altogether.
> >
> > In Firefox, albeit based on GTK+, does not show you
> > this menu. That's a
> > deficiency in Firefox which brings about several
> > other bugs. For
> > example, if your keyboard layout is other than
> > English, Ctrl-C and
> > others do not work, because it expects the literal
> > letter "C" (but I am
> > in Greek layout!). This is being worked on, slowly.
> >
> > Hope this helps a bit,
>
> I'm still largely baffled, I'm afraid.
> I'm writing documentation aimed at the user, so things
> like SCIM and modules... right over my head.
I had the chance to look into the GTK+ IM modules. They are located at
http://cvs.gnome.org/viewcvs/gtk%2B/modules/input/
Very interesting stuff. Of course, this does not help you much :).
> The questions I need to answer are:
> * why would a user use this menu?
It gives the user fine-grained functionality with the input of languages
other than English. The "Default" input method caters for the vast
majority of languages and they can be configured by the GNOME Keyboard
Preferences dialog.
However, there are cases that specialised input methods provided from
GTK+ can extend support to more complex languages or special cases.
For example, the International Phonetic Alphabet (IPA) is not a language
on its own; it is the universal alphabet that one can use to write the
pronunciation of words in any language and is found in dictionaries.
> * what happens when they use it?
It allows additional functionality that the user may take advantage of.
As Matthias mentioned, part of this functionality is to input individual
Unicode characters based on the codepoint. 㝷㑕Ͱ
That is, Ctrl-Shift B 5 produces µ.
Slightly more at
http://www.advogato.org/person/simosx/diary.html?start=5
> * in particular, how do each of the options work? How
> does a user, say, type in Amharic characters once they
> have selected the Amharic input method? Is it just
> like setting the keyboard language?
I'll try to answer the last question.
The keyboard support from X.org appears not to be suitable enough to
input specific languages, because
1. there are specific complexities that the subsystem cannot cope with.
For example, you can type in some languages using transliteration; you
type having in mind the transliteration of the language and you get the
proper script.
See
http://cvs.gnome.org/viewcvs/gtk%
2B/modules/input/imcyrillic-translit.c?view=markup
To the best of my knowledge, you cannot do this with the default input
method (either GTK+ Default or X.org Default).
2. You may want to change something small in the X.org input method,
therefore
http://cvs.gnome.org/viewcvs/gtk%
2B/modules/input/imcedilla.c?view=markup
and especially
/* The difference between this and the default input method is the
handling
* of C+acute - this method produces C WITH CEDILLA rather than C WITH ACUTE.
* For languages that use CCedilla and not acute, this is the preferred mapping,
* and is particularly important for pt_BR, where the us-intl keyboard is
* used extensively.
*/
3. Some languages are quite complicated but GTK+ appears to be able to
tackle it, without needed additional infrastructure.
For example, in Amharic
http://cvs.gnome.org/viewcvs/gtk%2B/modules/input/imam-et.c?view=markup
In this file, you may notice that there is a structure that defines
which languages use this input method. In this case it's, it's
"am" (Amharic). I am not sure on the exact significance of this.
The only description on what to type to get the result appears to be the
source files. :(. Technically, it should be easy to write a script that
parses the files and produce a nice table of the compose sequences.
For example, if you switch to IPA,
http://cvs.gnome.org/viewcvs/gtk%2B/modules/input/imipa.c?view=markup
you can type
a e and you get æ
> So... correct me if I'm wrong, but is this just an
> alternative way of setting your keyboard language if
> you're running GNOME on something other than Linux and
> X.org, and the regular pref tool doesn't work?
I would indeed describe it like this. The "does not work" I would
rephrase as "is not technically feasible or convenient to make work".
Simos
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]