Next: , Previous: gtk-object, Up: Gtk+ Objects


6.4.20 i-m-context

— Class: i-m-context

Superclass: g-object

i-m-context defines the interface for GTK+ input methods. An input method is used by GTK+ text input widgets like entry to map from key events to Unicode character strings.

The user may change the current input method via a context menu, unless the settings-gtk-show-input-method-menu property is set to FALSE. The default input method can be set programmatically via the settings-gtk-im-module property. Alternatively, you may set the GTK_IM_MODULE environment variable as documented in gtk-running.

The entry-im-module and text-view-im-module properties may also be used to set input methods for specific widget instances. For instance, a certain entry widget might be expected to contain certain characters which would be easier to input with a certain input method.

An input method may consume multiple key events in sequence and finally output the composed result. This is called preediting, and an input method may provide feedback about this process by displaying the intermediate composition states as preedit text. For instance, the default GTK+ input method implements the input of arbitrary Unicode code points by holding down the Control and Shift keys and then typing "U" followed by the hexadecimal digits of the code point. When releasing the Control and Shift keys, preediting ends and the character is inserted as text. Ctrl+Shift+u20AC for example results in the € sign.

Slots:

Signals: