12.07.2015 Views

free openSS

free openSS

free openSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

38 ❘ FREE/OPEN SOURCE SOFTWARE: LOCALIZATIONadding new keysyms.) The Unicode value must be prefixed with “0x100” to describe the keysym for asingle character.For more details of the file format, see Ivan Pascal’s XKB explanation. 23 When finished, the symbols.dir fileshould be regenerated so that the symbols file is listed:# cd /etc/X11/xkb/symbols# xkbcomp -lhlpR ‘*’ -o ../symbols.dirThen, the new layout may be tested as described in the previous section.Additionally, entries may be added to /etc/X11/xkbcomp/rules/x<strong>free</strong>86.lst so that some GUI keyboardconfiguration tools can see the layout.Once the new keyboard map is completed, it may also be included in XFree86 source where the data forXKB are kept under the xc/programs/xkbcomp subdirectory.XIM – X Input MethodFor some languages, text input is as straightforward as one-to-one mapping from keysyms to characters,such as English. For European languages, this is a little more complicated because of accents. But forChinese, Japanese and Korean (CJK), the one-to-one mapping is impossible. They require a series ofkeystroke interpretations to obtain each character.X Input Method (XIM) is a locale-based framework designed to address the requirements of text input forany language. It is a separate service for handling input events as requested by X clients. Any text entryin X clients is represented by X Input Context (XIC). All the keyboard events will be propagated to the XIM,which determines the appropriate action for the events based on the current state of the XIC, and passesback the resulting characters.Internally, a common process of every XIM is to translate keyboard scan code into keycode and then tokeysym, by calling XKB, whose process detail has been described in previous sections. The followingprocesses to convert keysyms into characters are different for different locales.In general cases, XIM is usually implemented using the client-server model. More detailed discussion ofXIM implementation is beyond the scope of this document. Please see Section 13.5 of the Xlib document 24and the XIM protocol 25 for more information.In general, users can choose their favourite XIM server by setting the system environment XMODIFIERS,like this:$ export LANG=th_TH.TIS-620$ export XMODIFIERS=”@im=Strict”This specifies Strict input method for Thai locale.GTK+ IMAs a cross-platform toolkit, GTK+ 2 defines its own framework using pure GTK+ APIs, instead of relyingon the input methods of each operating system. This provides high-level of abstraction, making inputmethods development a lot easier than writing XIM servers. In any case, GTK+ can still use the severalexisting XIM servers through the imxim bridging module. Besides, the input methods developed becomeimmediately available to GTK+ in all platforms it supports, including XFree86, Windows, and GNU/Linuxframebuffer console. The only drawback is that the input methods cannot be shared with non-GTK+applications.23Gettys, J., Scheifler, R.W., ‘Xlib – C Language X Interface, X Consortium Standard, X Version 11 Release 6.4.’24Narita, M., Hiura, H., The Input Method Protocol Version 1.0. X Consortium Standard, X Version 11 Release 6.4.25OpenI18N.org. OpenI18N Locale Name Guideline, Version 1.1 – 2003-03-11]; available from www.openi18n.org/docs/text/LocNameGuide-V11.txt.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!