• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

data/H03-May-2022-2,3132,217

debian/H18-Apr-2006-249156

doc/H03-May-2022-1,8891,606

gnome/H03-May-2022-502439

patches/H18-Apr-2006-182164

po/H18-Apr-2006-5,6064,308

rpm/H18-Apr-2006-286212

src/H03-May-2022-53,36839,960

AUTHORSH A D18-Apr-200640 21

COPYINGH A D18-Apr-2006100 32

ChangeLogH A D18-Apr-20066 KiB140139

INSTALLH A D18-Apr-200640 11

Makefile.amH A D03-May-2022103 52

Makefile.inH A D03-May-202221.8 KiB698622

NEWSH A D18-Apr-200635 11

READMEH A D18-Apr-200633.5 KiB879604

TODOH A D18-Apr-20062 KiB5427

aclocal.m4H A D03-May-2022282.2 KiB8,0077,181

autogen.shH A D18-Apr-20066 KiB208169

compileH A D18-Apr-20063.6 KiB14379

config.guessH A D18-Apr-200643 KiB1,4981,287

config.h.inH A D03-May-20224.7 KiB186126

config.subH A D18-Apr-200631.6 KiB1,6091,466

configureH A D03-May-2022886 KiB27,57522,575

configure.inH A D03-May-20228.4 KiB247221

depcompH A D18-Apr-200615.6 KiB531330

install-shH A D18-Apr-20069 KiB324189

intltool-extract.inH A D18-Apr-200622 KiB842686

intltool-merge.inH A D03-May-202234.4 KiB1,3571,073

intltool-update.inH A D18-Apr-200626.4 KiB1,066841

ltmain.shH A D18-Apr-2006192.1 KiB6,8725,424

missingH A D18-Apr-200610.8 KiB361268

mkinstalldirsH A D18-Apr-20061.9 KiB11285

README

1IM-JA v0.9
2
3Botond Botyanszki
4
5 <boti at rocketmail dot com>
6
7Copyright   2002 - 2003 Botond Botyanszki
8
9━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10
11Table of Contents
12
13Introduction
14Getting and installing IM-JA
15
16    Installing from source
17    RPM
18    Debian
19    Gentoo
20    FreeBSD
21    CVS
22
23Using IM-JA
24
25    Invoking the IM-JA input module for GTK
26    The XIM server
27    Setting your preferences
28    Keys and actions
29    Using the GNOME panel applet
30
31IM-JA and GTK/GNOME Applications
32
33    Stock GTK input widgets
34    Applications with custom widgets
35
36Troubleshooting
37Feedback
38
39    Contact and support
40    Bugreports
41
42Credits
43
44Introduction
45
46IM-JA is a Japanese input module for GTK+2. As of v0.9 it also has a XIM
47implementation.
48
49It supports kanji conversion using either the Canna or the (Free)Wnn kanji
50conversion engine. IM-JA can also do kanji character recognition, you can draw
51kanji into a widget using the mouse. This feature is based on the KanjiPad
52application which has been enhanced in IM-JA.
53
54IM-JA can be easily configured using a GUI tool. Conversion hotkeys, status
55window, preedit text colors, etc. can be all customized. An optional applet is
56also included for the gnome-panel which can be used to display and change the
57input method.
58
59GTK+2 has the advantage that it doesn't require X, so it should be possible to
60use IM-JA on PDAs and frame-buffer devices. Also, IM-JA provides the
61look-and-feel of GTK (and thus GNOME) so it is visually consistent with the
62client application unlike input methods (such as kinput2) which are based on
63Xlib.
64
65Getting and installing IM-JA
66
67Source and binary packages of the latest release are available from the project
68webpage at http://im-ja.sourceforge.net.
69
70Installing from source
71
72If you want to roll your own from a tarball, here is what you need to do. The
73compile/install procedure is the same as with most GNU applications:
74
75              % tar zxpvf im-ja-x.x.tar.gz
76              %  cd im-ja-x.x
77              % ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc
78              % make
79              % make install
80
81Before you start, you probably need to install some other packages to satisfy
82the dependencies. Requirements are: gconf2, libglade, gtk2 (2.2.0). Please note
83the dependency on version 2.2 of the gtk2 library. Unfortunately only the
84latest distro releases have this. It is recommended that you install at least
85version 2.2.2, earlier versions have a few input method related bugs.
86
87Canna support
88
89For Canna support, you will need to install the canna conversion server, the
90client libraries and development packages containing the header files. The
91development package for canna is libcanna1g-dev (or canna-dev) under debian.
92
93If you don't want Canna support, you should run configure with the
94--disable-canna option. In this case you don't have to install the canna
95packages.
96
97Wnn support
98
99For Wnn support, you will need to install the freewnn conversion server (the
100commercial might work as well), the client libraries and development packages
101containing the header files. The development package is freewnn-jserver-dev (or
102libwnn-dev) under debian.
103
104If you don't want Wnn support, you should run configure with the --disable-wnn
105option. In this case you don't have to install the Wnn packages.
106
107Gnome applet
108
109The gnome applet depends on libpanel-applet2 (2.0.0) and is compiled by default
110just like Wnn and Canna support.
111
112If you are not running GNOME or simply don't want to compile and install the
113applet then execute configure with the --disable-gnome option.
114
115Configuring GTK
116
117The gconf schema is installed into /etc/gconf. This directory can be
118exclusively specified with configure's --sysconfdir option.
119
120To enable the module in GTK so that it shows up in the Input Methods menu, you
121need to add something similar (depends on your $prefix) to /etc/gtk-2.0/
122gtk.immodules:
123
124   "/usr/lib/gtk-2.0/2.2.0/immodules/im-ja.so"
125   "im-ja" "Japanese" "gtk+" "/usr/share/locale" "ja"
126
127If you installed the module into the same prefix as gtk is installed in, you
128can update /etc/gtk-2.0/gtk.immodules by issuing the command
129
130      % gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
131
132If you installed it someplace else like /usr/local/lib/gtk-2.0/2.2.0/immodules
133then you could do this:
134
135      % gtk-query-immodules-2.0 /usr/local/lib/gtk-2.0/2.2.0/immodules/im-ja.so >> /etc/gtk-2.0/gtk.immodules
136
137Some distributions have scripts to automate this procedure such as
138update-gtk-immodules in Debian.
139
140RPM
141
142An all-in-one binary package should be available from the project webpage.
143Binary RPMs can be installed the following way:
144
145 % rpm -i im-ja-x.xxx.rpm
146
147Upgrading from rpm:
148
149 % rpm --upgrade im-ja-x.xxx.rpm
150
151If the provided RPM package does not install properly on your system, you can
152build a binary rpm from the source tarball:
153
154 % rpm -tb im-ja-x.x.tar.gz
155
156The rpm package should be created under /usr/src/RPM/RPMS/`uname -m`/ See rpm
157(8) for details.
158
159Debian
160
161Binary packages are available from the project webpage. IM-JA is split up into
162different Debian packages. Depending on your kanji conversion engine you may
163want to install either im-ja-all, im-ja-wnn or im-ja-canna. The optional GNOME
164panel applet is in the im-ja-applet package.
165
166IM-JA is also apt-get-able. Put this into your /etc/apt/sources.list:
167
168   deb http://im-ja.sourceforge.net/ ./
169   deb-src http://im-ja.sourceforge.net/ ./
170
171After running apt-get update, you should be able to install the IM-JA packages
172via apt-get.
173
174Building debian packages from the tarball:
175
176    $ tar zxpvf im-ja-x.x.tar.gz
177    $ cd im-ja-x.x
178    $ dpkg-buildpackage -rfakeroot
179
180You should install the created binary packages with dpkg -i. An alternative
181would be to use apt-src to do the build if you have added have the deb-src line
182to /etc/apt/sources.list.
183
184Gentoo
185
186IM-JA is already included in the Gentoo Linux distribution. Type emerge im-ja.
187If the ebuild is outdated, you may want to update the version and try building
188with the latest release.
189
190FreeBSD
191
192IM-JA has been recently added to the FreeBSD Ports Collection. See http://
193www.freshports.org/japanese/im-ja
194
195You can download, build, and install im-ja with FreeWnn and Canna support
196(including all dependencies) using the Ports Collection:
197
198    $ cd /usr/ports/japanese/im-ja
199    $ make install
200
201The following command will download and install the latest binary package of
202im-ja for your FreeBSD version and architecture:
203
204    $ pkg_add -r im-ja
205
206Please see the FreeBSD Handbook http://www.freebsd.org/doc/en_US.ISO8859-1/
207books/handbook/ports.html for complete details.
208
209CVS
210
211If you want the bleeding-edge, try the cvs version. It should work better but
212might contain some incomplete and buggy code in addition to the fixes and
213improvements to the last release. To get the cvs version, execute the
214following:
215
216    $ cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/im-ja checkout im-ja
217
218Using IM-JA
219
220Invoking the IM-JA input module for GTK
221
222To be able to input Japanese with IM-JA, GTK needs to load the input module. To
223invoke IM-JA, you should select "Japanese" from the Input Methods menu. The
224following actions should bring up this menu if the input widget (such as a text
225entry, text area, combo box, etc) has the focus:
226
227  ● Right-click on the widget with the mouse.
228
229  ● Press Shift-F10
230
231  ● Press the Menu key.
232
233If you want to have IM-JA automatically preloaded when you start your
234application (I'll use gedit in the example) here is what you can do:
235
236  ● Start your application like this:
237
238             $ GTK_IM_MODULE="im-ja" gedit
239
240    Or export this environment variable somewhere in your rc files.
241
242  ● If the locale is set to Japanese, im-ja will be automatically used. So you
243    can do this too:
244
245             $ LC_ALL="ja_JP" gedit
246
247  ● Edit the file /etc/gtk-2.0/gtk.immodules and change the "ja" field to "".
248    This means that IM-JA will be used as the default input module.
249
250The XIM server
251
252As of v0.9, IM-JA comes with a XIM server (im-ja-xim-server). This should be a
253drop-in replacement for other Japanese XIM servers such as kinput2. The XIM
254server uses the same settings (from GConf) as the GTK2 input module does.
255
256Clients should be able to connect to the xim server if they are started from
257either the same locale as the server was started from, e.g.:
258
259$ LC_ALL=en_US.UTF-8 im-ja-xim-server
260$ XMODIFIERS=@im=im-ja-xim-server LC_ALL=en_US.UTF-8 your_app
261
262or if they are started from a Japanese locale, e.g.:
263
264$ LC_ALL=en_US.UTF-8 im-ja-xim-server
265$ XMODIFIERS=@im=im-ja-xim-server LC_ALL=ja_JP your_app
266
267It is better to have the XMODIFIERS environment variable exported somewhere,
268for example in your .bashrc or globally in /etc/environment.
269
270XIM is a complicated protocol defining multiple modes on how the client can
271render the preedit text. The XIM implementation of IM-JA supports
272XIMPreeditCallbacks or XIMPreeditPosition for rendering the preedit text.If the
273preedit is not drawn properly in the client's window the built-in preedit
274window can be used.
275
276The following applications have been tested and are known to work with the
277IM-JA XIM input:
278
279  ● GTK2 applications via the XIM input module :-). It is still recommended to
280    use the native GTK2 module.
281
282OpenOffice.org
283
284  ● Emacs (preedit window) and XEmacs
285
286  ● GTK1 applications
287
288  ● mlterm
289
290Limitations of the XIM implementation
291
292XIMPreeditCallbacks and XIMPreeditPosition modes are quite different. The
293former is similar in concept to the GTK2 input modules, whre the client
294application is responsible for drawing the preedit text. In this case the XIM
295server tells the client how to draw the preedit but it has no information on
296where it will be placed in the client window, thus positioning the candidate
297window or the status window below the preedit string is not possible. In this
298case IM-JA will automatically use the table-style for the candidate window and
299the status window will be attached to the lower-left corner of the client
300window if the status window style is set to “Below cursor”.
301
302The XIM implementation doesn't support custom preedit colors for the Preedit
303style, changing this setting will only have effect in your native GTK2 input
304module.
305
306DISCLAIMER: I know that XIM is outdated technology and it is supposed to be
307replaced by IIIMF but in reality it is not. An IIIMF implementation is also
308planned but until this framework is not accepted more widely I don't see any
309merits. A XIM implementation was something that people can quickly switch to
310and use.
311
312Setting your preferences
313
314IM-JA has a GUI tool to configure user preferences conveniently. To start it
315you can
316
317  ● type im-ja-conf at the command line
318
319  ● right-click on the panel applet and select Preferences
320
321  ● bind a hotkey to start im-ja-conf from any application. Refer to the
322    Configurable keys section.
323
324While most GNOME applications react instantly to any changes you make, please
325note that the settings you change with im-ja-conf will not be reflected
326instantly in already running applications, except for the GNOME panel applet.
327You will have to restart already running applications. Also don't forget to
328press Apply before closing im-ja-conf if you have changed any settings.
329
330Hotkeys
331
332Double-clicking on a key entry under the Hotkeys tab in im-ja-conf will bring
333up a dialog box and wait for your keypress. Most of the action names are
334self-explanatory. The behaviour of the action keys is described in the
335Configurable keys section.
336
337Preedit Style
338
339The input that can be converted by the input module needs to be differentiated
340from the rest of the text for obvious reasons. IM-JA uses underline for this
341like most other Japanese input methods do. To indicate that the conversion will
342only occur on a part of the preedit text, highlighting is used.
343
344Both the background and foreground (font color) are configurable for the normal
345and highlighted preedit text. Usually, the default should suffice unless you
346want to make it a bit more fancy looking.
347
348Status Window
349
350People tend to prefer different positions for the status window. You can chose
351between four different positions in IM-JA. Note that the preedit window will
352always follow the cursor, so this setting only affects the status window.
353
354Below cursor
355
356    With this option the status window will follow the cursor as you type. This
357    is the most convenient way for some people because it gives feedback about
358    the current input mode without having to look away.
359
360    Note: some applications don't pass a proper cursor position to IM-JA, so
361    you it's impossible to display the status window below the cursor. "Bottom
362    left" is used with such apps.
363
364Window bottom left
365
366    Another common position for the status window is to attach it to the bottom
367    left corner of the window.
368
369Fixed coordinates
370
371    This is handy if you would like to have the status window displayed at a
372    fixed position. For example if you don't use the GNOME panel (thus you
373    cannot use the applet) you can use this option to make the status window
374    appear as if it were on the panel.
375
376Disabled
377
378    Most probably you will use this option if you have the GNOME panel applet
379    loaded.
380
381The Status window label is also fully configurable. You can specify a custom
382string that you want to have displayed in the status window for each input
383mode. The panel applet and the preedit window will be displaying the same.
384
385Conversion Engines
386
387IM-JA can use both the Canna and (free)Wnn conversion engines in addition to
388the KanjiPad character recognition interface to convert your input to kanji.
389With the Default kanji conversion engine radio button you can select either Wnn
390or Canna.
391
392If you are not running the Wnn conversion server (jserver) on localhost, you
393can specify the Server address. For Wnn, you will also need to specify the
394Wnnenvrc file if it's located in an unusual place. In most cases it should work
395fine if you leave it empty because IM-JA will look for it in the most commonly
396installed places such as /usr/lib/wnn/ja_JP/wnnenvrc and /usr/share/wnn/ja_JP/
397wnnenvrc. If you have trouble using Wnn, make sure you supply the full path to
398your wnnenvrc file.
399
400KanjiPad is enabled by default. If its default size is not adequate for you,
401you can set a custom window size.
402
403Other
404
405Default startup mode
406
407    Here you can set the Default startup mode. If you chose hiragana, then you
408    can immediately enter Japanese without having to press Shift-Space (or the
409    key you configured for hiragana mode).
410
411Show preedit window by default
412
413    By default, the preedit window is only shown if the application doesn't
414    support preedit mode and requests IM-JA to do so. Here you can override
415    this behaviour so that the preedit window will be always displayed.
416
417Candidate window style
418
419    You can select either a dropdown menu or a table to be used as the
420    candidate window. The latter is similar to the candidate window in kinput2.
421
422Keys and actions
423
424Configurable Keys
425
426Double-clicking on a key entry under the Hotkeys tab in im-ja-conf will bring
427up a dialog box and wait for your keypress. The behaviour of the action keys
428described here is for the Wnn conversion engine. Though our goal is to make
429both conversion modes act exactly the same, Canna mode might be different in
430some cases. If you have used a kana-kanji conversion program before, you should
431have no problems with IM-JA. Most of the action names are self-explanatory, but
432here is the full list of the description of actions you can bind key
433combinations to:
434
435Start the im-ja configurator
436
437    Pressing the assigned key will start im-ja-conf from the application if
438    IM-JA is active.
439
440Switch to next input mode
441
442    This will cycle through the next modes in the following order: Direct mode
443    -> Hiragana -> Katakana -> Half-width katakana -> Zenkaku romaji ->
444    Kanjipad
445
446Switch to previous input mode
447
448    This does the same as the above in reverse order.
449
450Set direct input mode
451
452    This key will put IM-JA into direct input mode. In this mode you can input
453    romaji (hankaku) directly into the application without passing it to the
454    kanji conversion server.
455
456Toggle hiragana/direct mode
457
458    The default, used by other input method programs such as kinput2, is Shift-
459    Space. If IM-JA is in direct mode, pressing this key will change to
460    conversion (hiragana) mode. A hiragana "a" on the status window will
461    indicate this mode. Your input, in hiragana, will be sent to the conversion
462    engine. You can convert your input in this mode by pressing the conversion
463    key (space will convert, and another custom key can be assigned as well).
464    Pressing this key once again (that is, in Hiragana mode) will switch back
465    to direct input mode.
466
467Toggle full/half-width katakana mode
468
469    If in not in full-width katakana mode, pressing this key will put IM-JA
470    into full-width katakana input mode. If in full-width katakana mode,
471    pressing this key will put IM-JA into half-width katakana input mode.
472
473Toggle half/full-width katakana mode
474
475    If not in half-width katakana mode, pressing this key will put IM-JA into
476    half-width katakana input mode. If in half-width katakana mode, pressing
477    this key will put IM-JA into full-width katakana input mode.
478
479Toggle Zenkaku/direct mode
480
481    If not in zenkaku romaji (double-width alphanumeric) input mode, pressing
482    this key will put IM-JA into Zenkaku romaji input mode. If in zenkaku
483    romaji mode, pressing this key will put IM-JA into direct input mode. The
484    default key for this action is Zenkaku, which is only found on Japanese
485    keyboards.
486
487Toggle kanjipad/direct input mode
488
489    Pressing this key will put IM-JA into KanjiPad mode if it's no already in
490    that mode. The KanjiPad widget will pop up into which you can draw kanji
491    characters for recognition. If the KanjiPad window is already displayed,
492    pressing this key will switch back to direct input mode.
493
494Unconvert current bunsetsu
495
496    Bunsetsu is a phrase (one or more kanji characters making up a word) in a
497    sentence. The current bunsetsu is usually highlighted when made up of kanji
498    characters. Pressing this key will unconvert it into hiragana. If the
499    bunsetsu is already hiragana it will be converted to katakana. The default
500    key for this action is Muhenkan, the unconvert key, which is only found on
501    Japanese keyboards.
502
503Convert current bunsetsu
504
505    If the input has not been converted yet, IM-JA will convert the whole
506    string. If the current bunsetsu is already converted, the next candidate
507    will be presented.
508
509Get previous candidate
510
511    This key will present the previous (kanji) candidate for the currently
512    converted bunsetsu. The default key for this action is the Up arrow key.
513
514Get next candidate
515
516    This key will present the previous (kanji) candidate for the currently
517    converted bunsetsu. The default key for this action is the Down arrow key.
518
519Show all candidates
520
521    This key will present all the candidates in a popup menu for the currently
522    converted or bunsetsu. If the string is not converted, it will be converted
523    first. You can navigate with the arrow keys and press enter. Space will
524    select the next candidate in the menu. You can also use the mouse to make
525    your selection. The default key for this action is F9.
526
527Select previous bunsetsu
528
529    This key will jump to the previous bunsetsu in an already converted string
530    if there are more of them. The default key for this action is the Left
531    arrow key.
532
533Select next bunsetsu
534
535    This key will jump to the next bunsetsu in an already converted string if
536    there are more of them. The default key for this action is the Right arrow
537    key.
538
539Expand current bunsetsu
540
541    This key will expand the current bunsetsu (highlighted), that is, the next
542    character to the right will be added to the bunsetsu. It is used to correct
543    the bunsetsu when the conversion engine incudes more/less characters to be
544    converted and you don't get the right kanji. The default key combination
545    for this action is Shift-Right.
546
547Shrink current bunsetsu
548
549    This key will shrink the current bunsetsu (highlighted), that is, throw the
550    rightmost kana outside of the bunsetsu. It is used to correct the bunsetsu
551    when the conversion engine incudes more/less characters to be converted and
552    you don't get the right kanji. The default key combination for this action
553    is Shift-Left.
554
555Toggle preedit window
556
557    The preedit is the underlined text that is converted by the conversion
558    server. In the case of GTK input modules, the application is responsible
559    for drawing the fonts and setting properties such as the highlight of the
560    preedit text. Some applications/widgets are unable to display it properly,
561    this is when you can use the preedit window in an over-the-spot fashion.
562    Properly written applications (such as the gnome-terminal) will notify
563    IM-JA if they cannot display the preedit, in this case the preedit window
564    will pop up automatically. If this doesn't happen or just want to invoke
565    the preedit window, press this key.
566
567Commit preedit string
568
569    Some applications grab the Enter key for their own use (e.g. Gaim) and
570    don't pass it to the input method, thus it is impossible to commit (enter)
571    the preedit string into the application. You can configure and additional
572    key combination to commit the preedit string that will behave like the
573    Enter key.
574
575Symbol input
576
577    As of version 0.8, IM-JA can do sophisticated symbol input such as arrows,
578    greek letters and cjk punctuation marks. Since there are just too many
579    characters in unicode, symbols are split into groups in IM-JA.
580
581    Pressing this hotkey will pop up a table with the names of symbol groups.
582    Clicking on the symbol group will bring up the list of symbols from that
583    group. Press Esc if you want to cancel the input.
584
585    Please note that most fonts only support a subset if the unicode character
586    set, thus you will be likely to see squares, or even the wrong charaters,
587    in place of some symbols. Another minor incovenience is that both WNN and
588    CANNA don't support unicode, so it is not possible to pass the symbol input
589    to the conversion server. As a result, your preedit will be committed and
590    you won't be able to do any conversion on the text that you entered prior
591    to the symbol input any more.
592
593UniCode input
594
595    Pressing this hotkey will pop up a simple entry where you can input the
596    unicode character code. The code has to be a four digit hexadecimal number.
597    IM-JA will notify you if the input was invalid. Press Esc if you want to
598    cancel the input.
599
600    Please note that, similarly to Symbol input, it is not possible to pass
601    unicode characters to the conversion server. As a result, your preedit will
602    be committed and you won't be able to do any conversion on the text that
603    you entered prior to the unicode input any more.
604
605JIS Code input
606
607    Pressing this hotkey will pop up a simple entry where you can input a four
608    digit JIS Code. IM-JA will notify you if the input was invalid. Press Esc
609    if you want to cancel the input.
610
611It is possible to bind keys to directly invoke the Canna and Wnn conversion
612mode so you can switch beetween them on the fly. These two actions are not
613listed in im-ja-conf, you will have to use the gconf-editor to configure these
614under /system/im-ja/hotkeys.
615
616Non-configurable keys
617
618There are some keys with hardcoded behaviour in IM-JA. These are the following:
619
620Enter
621
622    Commit the preedit string.
623
624Escape
625
626    Depending on the (conversion) state in which IM-JA is in, pressing Escape
627    will have the following effect:
628
629      ● If the current bunsetsu is converted then unconvert it.
630
631      ● If the current bunsetsu is already unconverted, drop the whole preedit
632        text.
633
634      ● If there is no preedit text then set the input to direct mode.
635
636Space
637
638    This is similar in behaviour to the configurable Convert key, except that
639    the Convert key won't display the candidate list when you press it multiple
640    times in a row. If you press space on an already converted bunsetsu, it
641    will present the candidate list.
642
643Backspace
644
645    Backspace, as expected, will delete a character from the left of the cursor
646    if it's not in a converted bunsetsu. If it's a converted bunsetsu,
647    Backspace will unconvert it first.
648
649Delete
650
651    Delete is similar to Backspace. It will delete a character from the right
652    of the cursor if it's not in a converted bunsetsu. If it's a converted
653    bunsetsu, it will be unconverted.
654
655Left, Right arrows
656
657    With the arrow keys, you can move the cursor in an unconverted preedit
658    text.
659
660Using the GNOME panel applet
661
662To add the applet to your GNOME panel, right-click on the panel, then select
663"Add to Panel" -> "Utility" -> "im-ja applet".
664
665The IM-JA GNOME panel applet is used to display the status of the input mode of
666the widget in focus. It can be also used to change the input mode without
667having to press any hotkey by left-clicking on the applet. This will pop up a
668menu from where you can select the desired input mode.
669
670IM-JA and GTK/GNOME Applications
671
672Unfortunately CJK input is far from perfect in GTK2 (and other Linux
673applications in general), but it's getting there slowly. The biggest drawback
674is that a lot of western developers are not aware of the complications of CJK
675input and inadvertently write code that will not function properly with IM-JA
676and other input modules.
677
678The most common mistake is when they bind keys to some actions in their
679applications and forget about the fact that the key event needs to be processed
680by the input module first (e.g., gaim, evolution, gnumeric). Due to the input
681method architecture in GTK2, input methods are not the first to recieve the key
682events, thus the situation is different from XIM. See http://bugzilla.gnome.org
683/show_bug.cgi?id=90082
684
685This can create some additional work for the programmer. Unfortunately this
686problem is not very easy to solve once you want to bind additional keys to a
687widget. If you are a programmer and are wondering how to satisfy this, here are
688some solutions:
689
690  ● Unfortunately using g_signal_connect("key_press_event") seems to be the
691    most trivial to most people when trying to bind additional keys to the
692    widget. Though this is very simple, there is no real known solution to pass
693    key events through the input modules with this approach.
694
695    While it is certainly a lot more work, the only real solution seems to be
696    to subclass the widget and use GtkBindingSet. See http://bugzilla.gnome.org
697    /show_bug.cgi?id=119051
698
699  ● It probably won't work in most situations but you could connect your
700    keyevent handler with g_signal_connect_after to the input widget.
701
702  ● This solution accesses an internal field (im_context) of the widget, it is
703    not legal code. Also it will create problems (mostly with XIM modules) in
704    case the module generates key events, thus it will end up in a loop. See
705    http://bugzilla.gnome.org/show_bug.cgi?id=119075 You should not use this
706    solution, but here it is:
707
708    Filter the keyevent through the input method context and only use the
709    keyevent if the input module did not handle it (returned FALSE), so you
710    should have something like this at the beginning of your event handler:
711
712          if (gtk_im_context_filter_keypress(GTK_TEXT_VIEW(text_view->entry)->im_context, event) == TRUE) return TRUE;
713          else {
714             /* process the GtkEventKey here */
715          }
716
717
718Stock GTK input widgets
719
720Input widgets in GTK2 are close to perfect. GtkIMContext related bugs are
721constantly being fixed, though GTK 2.2.2 still has a few bugs with GtkIMContext
722and IM-JA
723
724  ● The combo entry gets the arrow (up,down) keyevents before GtkIMContext does
725    if there are entries already in the combo history. So if you wanted to get
726    the next kanji candidate in a combo entry, it won't work: the combo entry
727    will append its last stored string to the preedit text. There is a patch
728    against gtk in IM-JA CVS that fixes this and is already fixed in GTK CVS,
729    it will be in 2.2.3.
730
731  ● Cursor is invisible inside a highlighted preedit string (preedit that has
732    pango attribute for background set) in GtkEntry, GtkComboEntry,
733    GtkAdjustment and possibly others. This bug doesn't affect GtkTextView
734    (multiline text area). So if you have custom colors for the normal preedit
735    enabled, you won't see your cursor inside the text in those widgets.
736
737Applications with custom widgets
738
739Unfortunately some applications with custom input widgets are far from usable
740with IM-JA and some other GTK input modules. The following is a summary about
741the (proper lack of) support for IM-JA by some of the latest and most widely
742used GTK2 application.
743
744gnome-terminal 2.2.2-1
745
746    gnome-terminal (with libvte) doesn't support preedit (pango attributes).
747    This is not a bug, but would be nice to have implemented. If you are using
748    kinput2 you won't see the highlight. Luckily, gnome-terminal notifies the
749    input method by calling gtk_im_context_set_use_preedit(), so IM-JA will
750    show the preedit window and you will be able to properly see the text you
751    want to enter.
752
753    You need to start gnome-terminal from a Japanese locale to see the text,
754    otherwise you will get mojibake:
755
756     $ LC_ALL="ja_JP" gnome-terminal
757
758    If you have other gnome-terminal instances running from a different locale,
759    then you will need to start it with the --disable-factory option, otherwise
760    gnome-terminal won't be using the ja_JP locale and you will still get
761    mojibake.
762
763evolution 1.4.0-3
764
765    The GtkHTML widget still needs some coding:
766
767       (evolution:21841): gtkhtml-WARNING **: preedit changed callback: implement me
768
769    This only comes from the main edit widget (GtkHTML), other entries work ok.
770    There is a patch I wrote available from CVS against gtkhtml that enables
771    Japanese input. Also starting the preedit window manually should help to
772    see the input.
773
774    Also the Esc and possibly other keys are used in the evolution composer
775    without taking the input module into account, so if you press Esc, evo will
776    ask if you want to discard the message instead of unconverting the kanji.
777
778abiword 1.9.0+cvs.2003.05.10-1
779
780    The cursor coordinates aren't passed properly to IM-JA so the status widget
781    appears in the upper left corner. The preedit doesn't get displayed
782    properly either and I get mojibake so it's useless with Japanese.
783
784mozilla 1.3.1-2 and other apps using gecko (galeon, moz-firebird, epiphany,
785    etc)
786
787    For some reason the mozilla developers ripped out the "Input Method" menu,
788    if you right-click on an input widget, you won't find it there. You can use
789    IM-JA by
790
791      ● preloading IM-JA when starting mozilla:
792
793         $ GTK_IM_MODULE="im-ja" mozilla
794
795      ● or if you use galeon, you can right-click on the addressbar or some
796        other stock GTK input widget and select Japanese there.
797
798    Otherwise Japanese input works mostly. Coloring (Pango attributes) doesn't
799    work though and the cursor position is not passed properly, so you won't
800    have the status window below the cursor. As a result, the candidate
801    selection window is not in place either.
802
803gaim 0.64
804
805    Enter key is stolen from the input module, so it's impossible to input
806    Japanese with im-ja. Solutions: you can configure an additional "Commit
807    preedit" key that will behave as Enter. I wrote a patch that fixes gaim
808    with IM-JA and kinput2, it's available from CVS.
809
810Troubleshooting
811
812You can try recompiling IM-JA with debugging enabled:
813
814./configure --enable-debug
815
816This will make the GTK module and the xim server print lots of debugging
817information which might help you understand what's going on.
818
819If you have any trouble with IM-JA, please contact the mailing list.
820
821Feedback
822
823Contact and support
824
825If you have any suggestions, wishes, comments or want to report a bug or send a
826patch, please contact the mailing list. You can subscribe at http://
827lists.sourceforge.net/lists/listinfo/im-ja-devel. If you want to contact me
828personally, you can reach me at <boti at rocketmail dot com>
829
830Bugreports
831
832Before you report a bug, please make sure you are using the latest version.
833Better yet, if you can, please install the CVS version.
834
835If you send bugreports, please include the following information also:
836
837  ● IM-JA version
838
839  ● GTK2 version
840
841  ● recompile IM-JA with the --enable-debug option, run your application from a
842    terminal and send us the output. This option will also add debugging
843    symbols, so you can run gdb on the applicaton IM-JA is running in.
844
845  ● if relevant, use strace and send us the output.
846
847  ● any other info you might think is important.
848
849Credits
850
851The following people have directly contributed to the development of IM-JA:
852
853  ● Main developer and project lead: Botond Botyanszki <boti at rocketmail dot
854    com>.
855
856  ● Canna RK implementation, kanjipad improvements and various other fixes:
857    Srin Tuar <srintuar26 at earthlink dot net>
858
859  ● Useful patches and suggestions: Vadim Berezniker <vadim at berezniker dot
860    com>
861
862The following people have contributed indirectly to the development of IM-JA:
863
864  ● Although im-ja has evolved a lot since, it is based on im-canna and
865    im-nakai written by Yukihiro Nakai which in turn were based on code written
866    by Yusuke Tabata. See http://bonobo.gnome.gr.jp/~nakai/immodule/
867
868  ● The kanji recognition uses Owen Taylor's Kanjipad which in turn is based on
869    code written by several people. See http://fishsoup.net/software/kanjipad/
870
871  ● Wnnlib was written by Makoto Ishisone, Software Research Associates, Inc.
872    and Moribe Hideyuki.
873
874  ● The xim server is heavily based on nabi, a Korean XIM server written by
875    Choe Hwanjin <krisna at kldp.org>
876
877  ● The xim server uses IMdkit, a XIM library written by Hidetoshi Tajima.
878
879